query-42c7dd102d3236e5d06e7456160f337a
Everything identified as being in a BL collection, with a shelfmark if we have it
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 ?item ?itemLabel ?collectionLabel ?shelfmark WHERE {
?item wdt:P195 ?collection .
?collection wdt:P195* wd:Q23308 .
OPTIONAL {?item wdt:P217 ?shelfmark} .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?collection")
v2("?item"):::projected
v1("?itemLabel"):::projected
v4("?shelfmark"):::projected
c5(["bd:serviceParam"]):::iri
c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c2(["wd:Q23308"]):::iri
v2 --"wdt:P195"--> v3
v3 --"wdt:P195"--> c2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P217".-> v4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end