Hello everyone!
I created a SPARQL query which should return all CHEMBL IDs (P592) from all values in significant drug interactions (P769) of item Q179996. It actually works and returns all values appropriately. But unfortunately, It also returns values my drug bot (https://www.wikidata.org/wiki/User:ProteinBoxBot/Drug_items) replaced about a month ago. So with the results returned, it is impossible to determine what the current and the old values are, even worse, it gives the impression to the user that both values are valid. This behaviour was also experienced by another user executing different queries.
Should this be a feature and not a bug (in order to allow queries on the revision history of items), I think it should be clearly stated in the documentation (and how to filter for only the current values). I could not find anything on that. Thank you!
Executed on:
https://query.wikidata.org/bigdata/namespace/wdq/sparql
PREFIX wd: <http://www.wikidata.org/entity/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX p: <http://www.wikidata.org/prop/> PREFIX v: <http://www.wikidata.org/prop/statement/> SELECT ?compound ?label ?chembl WHERE { ?compound wdt:P769 wd:Q179996 . ?compound wdt:P592 ?chembl OPTIONAL { ?compound rdfs:label ?label filter (lang(?label) = "en") . } }