query-e8344e074d9508b57a49f09df3aaf737
Bubble chart of number of museums in each 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#>
#defaultView:BubbleChart
SELECT ?countryLabel (COUNT(DISTINCT ?museum) AS ?count) WHERE {
?museum wdt:P31/wdt:P279* wd:Q33506 .
?museum wdt:P17 ?country .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} GROUP BY ?countryLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?count")
v2("?country")
v1("?museum"):::projected
a1((" "))
c3(["wd:Q33506"]):::iri
c6(["bd:serviceParam"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v1 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
v1 --"wdt:P17"--> v2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end
bind1[/"count(?museum)"/]
v1 --o bind1
bind1 --as--o v3