query-ea536b16a2079f0bb2e66254aacae59e

rq turtle/ttl

Drugs used as treatment for infectious diseases SELECT DISTINCT ?item WHERE { ?item wdt:P31 wd:Q12140 . ?item wdt:P2175 ?condition . ?condition wdt:P1995 wd:Q788926 .

SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } } LIMIT 10000

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Drugs used as treatment for infectious diseases
SELECT DISTINCT ?item 
WHERE {
  ?item wdt:P31 wd:Q12140 .
  ?item wdt:P2175 ?condition  .
  ?condition wdt:P1995 wd:Q788926 .

  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
LIMIT 10000

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?condition") v1("?item"):::projected c7(["bd:serviceParam"]):::iri c2(["wd:Q12140"]):::iri c9(["en"]):::literal c5(["wd:Q788926"]):::iri v1 --"wdt:P31"--> c2 v1 --"wdt:P2175"--> v2 v2 --"wdt:P1995"--> c5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end