query-d73b1fb3e4789477d7c4ef0b2b0e5596

rq turtle/ttl

title:Khalili Collections objects without images SELECT ?i ?iLabel ?collLabel ?inv (YEAR(?date) AS ?year) WHERE { ?i wdt:P195 ?coll. ?coll wdt:P361? wd:Q63160499. OPTIONAL {?i wdt:P217 ?inv} OPTIONAL {?i wdt:P571 ?date} FILTER (YEAR($date) < 1920). MINUS {?i wdt:P18 []} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } ORDER BY ?collLabel ?inv

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#>
#title:Khalili Collections objects without images
SELECT ?i ?iLabel ?collLabel ?inv (YEAR(?date) AS ?year) WHERE {
?i wdt:P195 ?coll.
  ?coll wdt:P361? wd:Q63160499.
  OPTIONAL {?i wdt:P217 ?inv}
  OPTIONAL {?i wdt:P571 ?date} FILTER (YEAR($date) < 1920).
  MINUS {?i wdt:P18 []}
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?collLabel ?inv

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?coll") v1("?collLabel"):::projected v3("?date"):::projected v4("?i"):::projected v2("?inv"):::projected v6("?year") a1((" ")) c9(["bd:serviceParam"]):::iri c3(["wd:Q63160499"]):::iri c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["year-from-dateTime(?date) < '1920^^xsd:integer'"]] f0 --> v3 v4 --"wdt:P195"--> v5 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v5 --"wdt:P361"--> c3 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; end union0r <== or ==> union0l end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P217".-> v2 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P571".-> v3 end subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v4 --"wdt:P18"--> a1 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end bind2[/"year-from-dateTime(?date)"/] v3 --o bind2 bind2 --as--o v6