query-040caa7128e5355c5db2e906a3ccfcb0

rq turtle/ttl

Multichill(P217)inventory number (P195)collection

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
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 DISTINCT ?item ?itemLabel ?collection ?collectionLabel ?inv WHERE {
  ?item p:P195 ?collectionstatement .
  ?collectionstatement ps:P195 ?collection .
  ?collectionstatement pq:P217 ?inv .
  FILTER NOT EXISTS {?item p:P217 ?invstatement}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } .
}
LIMIT 25000

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?collection"):::projected v3("?collectionstatement") v5("?inv"):::projected v2("?invstatement") v1("?item"):::projected c6(["bd:serviceParam"]):::iri c8(["en"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"p:P217"--> e0v2 e0v2("?invstatement"):::projected e0v1("?item"):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c1 f0 --> v2 v1 --"p:P217"--> v2 v1 --"p:P195"--> v3 v3 --"p:statement/P195"--> v4 v3 --"p:qualifier/P217"--> v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end