query-c22bd164335cc48da2867e31f6fbf418
Caves by country
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 ?country ?countryLabel ?cnt WHERE {
{
SELECT distinct ?country (COUNT(distinct ?item) AS ?cnt) WHERE {
?item (wdt:P31/wdt:P279*) wd:Q35509.
?item wdt:P17 ?country.
} GROUP BY ?country
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "bg,en". }
}
ORDER BY DESC(?cnt)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?cnt"):::projected
v3("?country"):::projected
v2("?item")
a1((" "))
c6(["bd:serviceParam"]):::iri
c8(["bg,en"]):::literal
c3(["wd:Q35509"]):::iri
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
v2 --"wdt:P17"--> v3
bind1[/"count(?item)"/]
v2 --o bind1
bind1 --as--o v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end