query-e32ffafe18af143734740fcdb71ccca0

rq turtle/ttl

Zahl der Objekte (d.h. Items) in #Berliner Museen auf #Wikidata (#SPARQL) je Museum

Use at

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:BarChart
SELECT ?mus ?musLabel (COUNT(?obj) AS ?n) WHERE {
  ?mus (wdt:P31|wdt:P31/wdt:P279|wdt:P31/wdt:P279/wdt:P279|wdt:P31/wdt:P279/wdt:P279/wdt:P279) wd:Q33506 ;
       wdt:P131/wdt:P131* wd:Q64 .
  ?obj wdt:P276 ?mus .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} GROUP BY ?mus ?musLabel
ORDER BY DESC(?n)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?mus"):::projected v4("?n") v3("?obj"):::projected a1((" ")) a2((" ")) a3((" ")) a4((" ")) a5((" ")) a6((" ")) a7((" ")) c2(["wd:Q33506"]):::iri c8(["bd:serviceParam"]):::iri c5(["wd:Q64"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; subgraph union2[" Union "] subgraph union2l[" "] style union2l fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P31"--> a4 a4 --"wdt:P279"--> a5 a5 --"wdt:P279"--> a6 a6 --"wdt:P279"--> c2 end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P31"--> a2 a2 --"wdt:P279"--> a3 a3 --"wdt:P279"--> c2 end union2r <== or ==> union2l end end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c2 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P31"--> c2 end union0r <== or ==> union0l end v2 --"wdt:P131"--> a7 a7 --"wdt:P131"--> c5 v3 --"wdt:P276"--> v2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end bind1[/"count(?obj)"/] v3 --o bind1 bind1 --as--o v4