query-887d3496ec97cbaa0c54e8121a1b8e1f

rq turtle/ttl

TODO

Use at

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 . 
  } 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") c3(["wd:Q20"]):::iri f0[["?lastnameLabel = 'nn'"]] f0 --> v2 v3 --"wdt:P27"--> c3 v3 --"wdt:P734"--> v4 bind2[/"count(*)"/] bind2 --as--o v5 v4 --"rdfs:label"--> v2