query-dc7fd26d8bf61dc625c6f37bd96306aa
TODO
Use at
- https://query.wikidata.org/sparql
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#>
SELECT ?lastnameLabel ?count WHERE
{
{
SELECT (COUNT(*) AS ?count) ?lastname WHERE {
?person wdt:P27 wd:Q20 .
?person wdt:P734 ?lastname .
?lastname wdt:P31 wd:Q101352 .
?lastname wdt:P17 wd:Q20.
} GROUP BY ?lastname } ?lastname rdfs:label ?lastnameLabel. filter(lang(?lastnameLabel)="nn")
}
ORDER BY DESC(?count)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?count"):::projected
v4("?lastname")
v2("?lastnameLabel"):::projected
v3("?person")
c6(["wd:Q101352"]):::iri
c3(["wd:Q20"]):::iri
f0[["?lastnameLabel = 'nn'"]]
f0 --> v2
v3 --"wdt:P27"--> c3
v3 --"wdt:P734"--> v4
v4 --"wdt:P31"--> c6
v4 --"wdt:P17"--> c3
bind2[/"count(*)"/]
bind2 --as--o v5
v4 --"rdfs:label"--> v2