query-5c10d3d3e431cc5f70711b174ea3953f
Get all the drug-drug interactions for Methadone SELECT ?compound ?chembl ?label WHERE { ?item wdt:P592 'CHEMBL651' . ?item wdt:P769 ?compound . ?compound wdt:P592 ?chembl . OPTIONAL {?compound rdfs:label ?label filter (lang(?label) = "en")} }
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
#Get all the drug-drug interactions for Methadone
SELECT ?compound ?chembl ?label WHERE {
?item wdt:P592 'CHEMBL651' .
?item wdt:P769 ?compound .
?compound wdt:P592 ?chembl .
OPTIONAL {?compound rdfs:label ?label filter (lang(?label) = "en")}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?chembl"):::projected
v3("?compound"):::projected
v2("?item")
v1("?label"):::projected
c3(["CHEMBL651"]):::literal
v2 --"wdt:P592"--> c3
v2 --"wdt:P769"--> v3
v3 --"wdt:P592"--> v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."rdfs:label".-> v1
end