query-4d66a758127b4e9f3460bd781cdabe28

rq turtle/ttl

title:Memory of the World inscriptions without a type statement SELECT ?item ?itemLabel (YEAR(?date) AS ?year) WHERE { ?item p:P1435 ?s. ?s ps:P1435 wd:Q473858 # Heritage designation: MotW OPTIONAL{?s pq:P580 ?date} # Start date MINUS{?item wdt:P31 ?type} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } ORDER BY ?year

Use at

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#>
#title:Memory of the World inscriptions without a type statement
SELECT ?item ?itemLabel (YEAR(?date) AS ?year) WHERE {
  ?item p:P1435 ?s. ?s ps:P1435 wd:Q473858 # Heritage designation: MotW
  OPTIONAL{?s pq:P580 ?date} # Start date
  MINUS{?item wdt:P31 ?type}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?year

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?date"):::projected v2("?item"):::projected v3("?s") v5("?type") v6("?year") c7(["bd:serviceParam"]):::iri c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal c3(["wd:Q473858"]):::iri v2 --"p:P1435"--> v3 v3 --"p:statement/P1435"--> c3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:qualifier/P580".-> v4 end subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v2 --"p:direct/P31"--> v5 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end bind1[/"year-from-dateTime(?date)"/] v4 --o bind1 bind1 --as--o v6