query-a6f2464945810082b5afe9c559220ffc
Count all items with World Geographical ID SELECT (COUNT (DISTINCT ?item) AS ?count) WHERE { ?item wdt:P11897 ?value # change P5037 to another property SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Count all items with World Geographical ID
SELECT (COUNT (DISTINCT ?item) AS ?count)
WHERE
{
?item wdt:P11897 ?value
# change P5037 to another property
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?count")
v1("?item"):::projected
v2("?value")
c3(["bd:serviceParam"]):::iri
c5(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v1 --"wdt:P11897"--> v2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c3 --"wikibase:language"--> c5
end
bind1[/"count(?item)"/]
v1 --o bind1
bind1 --as--o v3