query-7018f489e5e06a67274460ff7fbbae9a

rq turtle/ttl

Causes of Death) in humans, together with their respective number of occurrences (items that link to this cause of death via P509). Property:P509I’m trying to obtain a list of all causes of death (This works, but only gives me distinct causes of death without their number of occurrences:

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 DISTINCT ?causeOfDeath ?causeOfDeathLabel
WHERE 
{
  ?item wdt:P31 wd:Q5;
        wdt:P509 ?causeOfDeath.
  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; v2("?causeOfDeath"):::projected v1("?item") c5(["bd:serviceParam"]):::iri c2(["wd:Q5"]):::iri c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal v1 --"wdt:P31"--> c2 v1 --"wdt:P509"--> v2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end