query-0bde4a4050bf0011bff16141d71ed970
Propertiespart of (P361)instance of (P31)country (P17)collection or exhibition size (P1436)applies to part, aspect, or form (P518)
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?collection ?collectionLabel ?partofLabel ?countryLabel ?size ?partLabel WHERE {
?collection p:P1436 ?s.
?s ps:P1436 ?size
OPTIONAL {?s pq:P518 ?part} # Applies to part
OPTIONAL {?collection wdt:P361 ?partof . # Get the organisation the collection is part of
MINUS{ ?partof wdt:P31 wd:Q13406463 } } # but not Wikimedia list articles
OPTIONAL {?collection wdt:P17 ?country}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
FILTER (?size > 100)
} ORDER BY DESC(?size)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?collection"):::projected
v6("?country")
v4("?part")
v5("?partof")
v3("?s")
v1("?size"):::projected
c10(["bd:serviceParam"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c7(["wd:Q13406463"]):::iri
f0[["?size > '100^^xsd:integer'"]]
f0 --> v1
v2 --"p:P1436"--> v3
v3 --"p:statement/P1436"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:qualifier/P518".-> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P361".-> v5
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v5 --"p:direct/P31"--> c7
end
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P17".-> v6
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end