query-a664fb6b7578158a8d6ec9cc55a50439
Natural disasters with different number of deaths
Use at
- https://query.wikidata.org/sparql
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 ?item ?itemLabel (COUNT(?deaths) AS ?cnt) WHERE {
{
SELECT ?item WHERE {
?item wdt:P1120 ?deaths .
} GROUP BY ?item HAVING(COUNT(?deaths) > 1)
}.
?item wdt:P31/wdt:P279* wd:Q8065 .
?item wdt:P1120 ?deaths .
SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
} GROUP BY ?item ?itemLabel ORDER BY DESC(?cnt)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?_anon_42b5416610844a34809f33a099ae9de141716")
v5("?cnt")
v3("?deaths"):::projected
v2("?item"):::projected
a1((" "))
a2((" "))
c7(["bd:serviceParam"]):::iri
c5(["wd:Q8065"]):::iri
c9(["en"]):::literal
f0[[" > '1^^xsd:integer'"]]
f0 --> a1
v2 --"wdt:P1120"--> v3
bind2[/"count(?deaths)"/]
v3 --o bind2
bind2 --as--o v4
v2 --"wdt:P31"--> a2
a2 --"wdt:P279"--> c5
v2 --"wdt:P1120"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end
bind4[/"count(?deaths)"/]
v3 --o bind4
bind4 --as--o v5