query-eee7e810fe09c7adad166171dcfc88a5
Query optimizationAny chance this query doesn't time out?
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 schema: <http://schema.org/>
SELECT ?item ?dob ?dod ?sitelinks (COUNT(DISTINCT ?article) AS ?lang_wiki_sitelinks)
WHERE {
?item wdt:P31 wd:Q5 .
OPTIONAL { ?item wdt:P569 ?dob }
OPTIONAL { ?item wdt:P570 ?dod }
?article schema:about ?item ;
schema:isPartOf ?partof .
?partof wikibase:wikiGroup "wikipedia" .
?item wikibase:sitelinks ?sitelinks .
}
GROUP BY ?item ?dob ?dod ?sitelinks
HAVING (?lang_wiki_sitelinks > 200)
ORDER BY DESC(?lang_wiki_sitelinks)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?article"):::projected
v3("?dob"):::projected
v4("?dod"):::projected
v2("?item"):::projected
v8("?lang_wiki_sitelinks")
v6("?partof")
v7("?sitelinks"):::projected
c3(["wd:Q5"]):::iri
c9(["wikipedia"]):::literal
f0[["?lang_wiki_sitelinks > '200^^xsd:integer'"]]
f0 --> v8
v2 --"wdt:P31"--> c3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P569".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P570".-> v4
end
v5 --"schema:about"--> v2
v5 --"schema:isPartOf"--> v6
v6 --"wikibase:wikiGroup"--> c9
v2 --"wikibase:sitelinks"--> v7
bind2[/"count(?article)"/]
v5 --o bind2
bind2 --as--o v8