query-1a1169e84c154f5bc2477cebf92511c2

rq turtle/ttl

Antibiotics(Q12187)antibiotic subclass of (Q584144)antituberculous drug subclass of (Q192717)streptomycin streptomycin (Q256602)ciprofloxacin cipro . has role of being an antibiotic....(Q258450)benzylpenicillin penicillin G (Q12187)antibiotic subclass of (Q306264)β-lactam antibiotic subclass of (Q12190)penicillin penicillin Query does not have good coverage.... Class versus instance problem.

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#>
SELECT ?antibiotic ?antibioticLabel
{
  # occupation a pirate
  ?antibiotic wdt:P31/wdt:P279* wd:Q12187 .

  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .
  }

} ORDER BY ?pirateLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?antibiotic"):::projected v1("?pirateLabel") a1((" ")) c3(["wd:Q12187"]):::iri c5(["bd:serviceParam"]):::iri c7(["en"]):::literal v2 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end