query-5c84c712448fe6f43c251507d7c2ff9c

rq turtle/ttl

PD works without proper qualifiers which were published more than 95 years ago and whose author died more than 100 years ago

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
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 distinct ?item ?dop ?mdod   ?itemLabel 
where { 
  # look for items of type "work" (or children)
  ?item wdt:P31/wdt:P279* wd:Q386724. 

  ?item wdt:P577 ?dop . # date of publication
  FILTER(?dop  < "1924-01-01"^^xsd:dat) .
  FILTER(?mdod < "1918-01-01"^^xsd:dat) .
  FILTER NOT EXISTS {?item wdt:P6216 [] } . 

  # Date of death of the last surviving creator
  {SELECT ?item  (max(?dod) as ?mdod) 
  where {
    ?item wdt:P50|wdt:P170|wdt:P655|wdt:P84|wdt:P110|wdt:P287 ?creator .
    ?creator wdt:P570 ?dod .
  }  group by ?item  }.

  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?creator") v5("?dod") v3("?dop"):::projected v1("?item"):::projected v6("?mdod"):::projected a1((" ")) a2((" ")) c16(["bd:serviceParam"]):::iri c6(["wd:Q386724"]):::iri c18(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"wdt:P6216"--> e0a1 e0v1("?item"):::projected e0a1((" ")):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c1 f0 --> a1 v1 --"wdt:P6216"--> a1 f1[["?mdod < s1918-01-01^^<http://www.w3.org/2001/XMLSchema#dat>'"]] f1 --> v6 f2[["?dop < s1924-01-01^^<http://www.w3.org/2001/XMLSchema#dat>'"]] f2 --> v3 v1 --"wdt:P31"--> a2 a2 --"wdt:P279"--> c6 v1 --"wdt:P577"--> v3 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; subgraph union2[" Union "] subgraph union2l[" "] style union2l fill:#abf,stroke-dasharray: 3 3; subgraph union3[" Union "] subgraph union3l[" "] style union3l fill:#abf,stroke-dasharray: 3 3; subgraph union4[" Union "] subgraph union4l[" "] style union4l fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P287"--> v4 end subgraph union4r[" "] style union4r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P110"--> v4 end union4r <== or ==> union4l end end subgraph union3r[" "] style union3r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P84"--> v4 end union3r <== or ==> union3l end end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P655"--> v4 end union2r <== or ==> union2l end end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P170"--> v4 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P50"--> v4 end union0r <== or ==> union0l end v4 --"wdt:P570"--> v5 bind4[/"max(?dod)"/] v5 --o bind4 bind4 --as--o v6 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c16 --"wikibase:language"--> c18 end