query-f9aa49347de2e2fe872faacfbbb51f7e

rq turtle/ttl

Locating P2175 statements referenced to the NDF-RT database SELECT DISTINCT ?drug ?drugLabel ?disease ?diseaseLabel WHERE {?reference pr:P248 wd:Q21008030. ?statement prov:wasDerivedFrom ?reference. ?statement ps:P2175 ?disease. ?drug p:P2175 ?statement.

   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }

    }

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Locating P2175 statements referenced to the NDF-RT database
SELECT DISTINCT ?drug ?drugLabel ?disease ?diseaseLabel
  WHERE {?reference pr:P248 wd:Q21008030.
         ?statement prov:wasDerivedFrom ?reference.
         ?statement ps:P2175 ?disease.
         ?drug p:P2175 ?statement.

       SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }

        }

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?disease"):::projected v4("?drug"):::projected v1("?reference") v2("?statement") c7(["bd:serviceParam"]):::iri c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal c2(["wd:Q21008030"]):::iri v1 --"p:reference/P248"--> c2 v2 --"prov:wasDerivedFrom"--> v1 v2 --"p:statement/P2175"--> v3 v4 --"p:P2175"--> v2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end