query-424ae51f167d1179a5c3ccd7eca3445e

rq turtle/ttl

Propertiesinstance of (P31)cause of death (P509)date of death (P570)subclass of (P279) Propertiesinstance of (P31)cause of death (P509)date of death (P570)subclass of (P279) Propertiesinstance of (P31)cause of death (P509)date of death (P570)subclass of (P279) Propertiesinstance of (P31)cause of death (P509)date of death (P570)subclass of (P279) Propertiesinstance of (P31)cause of death (P509)date of death (P570)subclass of (P279) Propertiesinstance of (P31)cause of death (P509)date of death (P570)subclass of (P279) Propertiesinstance of (P31)cause of death (P509)date of death (P570)subclass of (P279) Propertiesinstance of (P31)cause of death (P509)date of death (P570)subclass of (P279) Propertiesinstance of (P31)cause of death (P509)date of death (P570)subclass of (P279) Propertiesinstance of (P31)cause of death (P509)date of death (P570)subclass of (P279)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:AreaChart
SELECT ?cod (STR(SAMPLE(?yearOfDeath)) AS ?YEAR_Of_DEATH) (COUNT(*) AS ?NUMBER_OF_DEATHS) ?cause WHERE {
  ?pid wdt:P31 wd:Q5;  # instance of human
       wdt:P509 ?cod;  # cause of death
       wdt:P570 ?_date_of_death.
  ?cod wdt:P279* wd:Q12078.  # type of cancer
 SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
                         ?cod rdfs:label ?cause. }
  BIND ( YEAR(?_date_of_death) AS ?yearOfDeath )
  FILTER( ?yearOfDeath > 1960 )
}
GROUP BY ?cod ?cause ?yearOfDeath

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v8("?NUMBER_OF_DEATHS") v7("?YEAR_Of_DEATH") v6("?_anon_42b5416610844a34809f33a099ae9de187120"):::projected v4("?_date_of_death") v5("?cause"):::projected v3("?cod"):::projected v2("?pid") v6("?yearOfDeath") c7(["wd:Q12078"]):::iri c9(["bd:serviceParam"]):::iri c3(["wd:Q5"]):::iri c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["?yearOfDeath > '1960^^xsd:integer'"]] f0 --> v6 v2 --"wdt:P31"--> c3 v2 --"wdt:P509"--> v3 v2 --"wdt:P570"--> v4 v3 --"wdt:P279"--> c7 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 v3 --"rdfs:label"--> v5 end bind1[/"year-from-dateTime(?_date_of_death)"/] v4 --o bind1 bind1 --as--o v6 bind4[/"sample(?yearOfDeath)"/] v6 --o bind4 bind4 --as--o v6 bind5[/"str()"/] null --o bind5 bind5 --as--o v7 bind6[/"count(*)"/] bind6 --as--o v8