query-8986862ad46e5ec17c3cea7ab0f042ee
Museums with most paintings Propertieslocation (P276)instance of (P31)
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 ?location ?locationLabel (COUNT(?item) AS ?count ) WHERE {
?item wdt:P276 ?location.
?item wdt:P31 wd:Q3305213.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]" }
}
GROUP BY ?location ?locationLabel
ORDER BY DESC(?count)
LIMIT 10
Query found at
- https://www.wikidata.org/wiki/User:Geertivp/training/Wikidata_Query/Musea_with_most_paintings
- https://www.wikidata.org/wiki/User:Vislupus
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?count")
v2("?item"):::projected
v3("?location"):::projected
c3(["wd:Q3305213"]):::iri
c5(["bd:serviceParam"]):::iri
c7(["#91;AUTO_LANGUAGE#93;"]):::literal
v2 --"wdt:P276"--> v3
v2 --"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 v4