query-959a43ed18e1c8e94ab1b120f8f35002
TODO
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 ?person ?personLabel (GROUP_CONCAT(?nationality;separator=', ') AS ?nationalities) WHERE{
{
SELECT DISTINCT ?person ?cnt ?nationality WHERE{
?person wdt:P106/wdt:P279* wd:Q901;
wikibase:sitelinks ?cnt .
?person wdt:P27 ?nationality .
} ORDER BY DESC(?cnt) LIMIT 500
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
GROUP BY ?person ?personLabel
ORDER BY DESC(?cnt)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?cnt")
v4("?nationalities")
v3("?nationality"):::projected
v2("?person"):::projected
a1((" "))
c7(["bd:serviceParam"]):::iri
c3(["wd:Q901"]):::iri
c9(["en"]):::literal
v2 --"wdt:P106"--> a1
a1 --"wdt:P279"--> c3
v2 --"wikibase:sitelinks"--> v1
v2 --"wdt:P27"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end
bind1[/"?nationality"/]
v3 --o bind1
bind1 --as--o v4