query-9a383d1fee36538caff3ba9cbf50eeb3
Bar Chart: Popular Bulgarian surnames
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#>
#defaultView:BarChart
SELECT ?surname ?surnameLabel ?count WHERE {
{
SELECT ?surname (COUNT(?person) AS ?count) WHERE {
?person wdt:P31 wd:Q5.
?person wdt:P734 ?surname.
?surname wdt:P407 wd:Q7918.
}
GROUP BY ?surname
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?count)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?count"):::projected
v2("?person")
v3("?surname"):::projected
c5(["wd:Q7918"]):::iri
c7(["bd:serviceParam"]):::iri
c2(["wd:Q5"]):::iri
c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v2 --"wdt:P31"--> c2
v2 --"wdt:P734"--> v3
v3 --"wdt:P407"--> c5
bind1[/"count(?person)"/]
v2 --o bind1
bind1 --as--o v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end