query-be12003b7e598463dcda0bf1b8b66f84
Distribution of values of a property SELECT distinct ?name ?nameLabel (COUNT(distinct ?item) AS ?cnt) WHERE { ?name wdt:P31 wd:Q12308941 . ?name wdt:P407 wd:Q7737 . ?item wdt:P735 ?name . SERVICE wikibase:label { bd:serviceParam wikibase:language "ru" } } GROUP BY ?name ?nameLabel ORDER BY DESC(?cnt)
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#>
# Distribution of values of a property
SELECT distinct ?name ?nameLabel (COUNT(distinct ?item) AS ?cnt)
WHERE {
?name wdt:P31 wd:Q12308941 .
?name wdt:P407 wd:Q7737 .
?item wdt:P735 ?name .
SERVICE wikibase:label { bd:serviceParam wikibase:language "ru" }
} GROUP BY ?name ?nameLabel ORDER BY DESC(?cnt)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?cnt")
v3("?item"):::projected
v2("?name"):::projected
c2(["wd:Q12308941"]):::iri
c7(["bd:serviceParam"]):::iri
c9(["ru"]):::literal
c4(["wd:Q7737"]):::iri
v2 --"wdt:P31"--> c2
v2 --"wdt:P407"--> c4
v3 --"wdt:P735"--> v2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end
bind1[/"count(?item)"/]
v3 --o bind1
bind1 --as--o v4