query-b4926ad417a315b00a45ab64294034e4
SELECT ?item ?itemLabel ?propLabel ?toponym ?toponymLabel SELECT DISTINCT ?p ?propLabel (COUNT(?item) AS ?itemCount) WHERE { ?item ?p ?toponym. ?prop wikibase:directClaim ?p. ?toponym wdt:P31 wd:Q7884789 . SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } GROUP BY ?p ?propLabel ORDER BY DESC(?itemCount)
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 ?item ?itemLabel ?propLabel ?toponym ?toponymLabel
SELECT DISTINCT ?p ?propLabel (COUNT(?item) AS ?itemCount)
WHERE {
?item ?p ?toponym.
?prop wikibase:directClaim ?p.
?toponym wdt:P31 wd:Q7884789 .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?p ?propLabel
ORDER BY DESC(?itemCount)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?item"):::projected
v6("?itemCount")
v3("?p"):::projected
v5("?prop")
v4("?toponym")
c5(["bd:serviceParam"]):::iri
c3(["wd:Q7884789"]):::iri
c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v2 -->v3--> v4
v5 --"wikibase:directClaim"--> v3
v4 --"wdt:P31"--> c3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end
bind1[/"count(?item)"/]
v2 --o bind1
bind1 --as--o v6