query-ca4ee607c8ea791c4cef65c5d0615111

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Counting drug annotations
#defaultView:BubbleChart
SELECT ?drug ?drugLabel ?count
WHERE 
{
  {
    SELECT ?drug (COUNT(?annotation) AS ?count)    
WHERE {
        ?annotation wdt:P15 ?drug.
        ?annotation wdt:P16 "infectiousdiseasesdrugs" .
       }
  GROUP BY ?drug 
  HAVING (?count > 1)        
  }
   SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY DESC(?count)
LIMIT 500

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?annotation") v4("?count"):::projected v3("?drug"):::projected c6(["bd:serviceParam"]):::iri c8(["en"]):::literal c4(["infectiousdiseasesdrugs"]):::literal f0[["?count > '1^^xsd:integer'"]] f0 --> v4 v2 --"wdt:P15"--> v3 v2 --"wdt:P16"--> c4 bind2[/"count(?annotation)"/] v2 --o bind2 bind2 --as--o v4 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end