query-144cd97561c308eacb3bb442c2884307
Muzea
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 ?collection ?collectionLabel (count(?item) as ?count) (SAMPLE(?item) as ?sampleitem) WHERE {
?item wdt:P170 wd:Q381238 .
?item wdt:P195 ?collection .
minus {?collection wdt:P31 wd:Q768717 }
FILTER (!wikibase:isSomeValue(?collection))
SERVICE wikibase:label { bd:serviceParam wikibase:language "pl,pl" }
} group by ?collection ?collectionLabel
order by desc(?count)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?collection"):::projected
v4("?count")
v3("?item"):::projected
v4("?sampleitem")
c9(["pl,pl"]):::literal
c2(["wd:Q381238"]):::iri
c7(["bd:serviceParam"]):::iri
c5(["wd:Q768717"]):::iri
f0[["not http://wikiba.se/ontology#isSomeValue(?collection)"]]
f0 --> v2
v3 --"wdt:P170"--> c2
v3 --"wdt:P195"--> v2
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v2 --"wdt:P31"--> c5
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end
bind4[/"count(?item)"/]
v3 --o bind4
bind4 --as--o v4
bind5[/"sample(?item)"/]
v3 --o bind5
bind5 --as--o v4