query-f1680d84b34eb476f61720bbedd49d98
People with more than one date of deathHello! By tweaking the example query about buildings in more than one country, I got as far as the following but that times out (not necessarily surprising given there are so many humans? But even adding a LIMIT to the inside query does not help)
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
WHERE
{
{
SELECT ?item (COUNT(DISTINCT ?dob) AS ?count) WHERE {
?item wdt:P31 wd:Q5 .
?item wdt:P569 ?dob .
}
GROUP BY ?item
LIMIT 10
}
FILTER ( ?count > 1 )
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . }
}
ORDER BY DESC(?count) ?itemL
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?count"):::projected
v4("?dob")
v3("?item"):::projected
v2("?itemL")
c6(["bd:serviceParam"]):::iri
c3(["wd:Q5"]):::iri
c8(["en"]):::literal
f0[["?count > '1^^xsd:integer'"]]
f0 --> v5
v3 --"wdt:P31"--> c3
v3 --"wdt:P569"--> v4
bind2[/"count(?dob)"/]
v4 --o bind2
bind2 --as--o v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end