query-02e41eff3cf09f7dde0a5252d5dd9bce

rq turtle/ttl

ConstraintsI set up the constraints. Completely focused on artworks now, but that can always be changed. : Interesting query for the copyright edge cases: Hannolans@

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?item ?inception ?dod ?country WHERE {
  ?item wdt:P4765 ?url .
  { ?item wdt:P571 ?inception  . FILTER(YEAR(?inception) > 1923) . OPTIONAL {  ?item wdt:P170 ?creator . ?creator wdt:P570 ?dod } } UNION {
    ?item wdt:P170 ?creator . ?creator wdt:P570 ?dod . FILTER(YEAR(?dod) > 1923) . OPTIONAL { ?item wdt:P571 ?inception } }
  OPTIONAL { ?item wdt:P170 ?creator . ?creator wdt:P27 ?country } 
  }

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?country"):::projected v4("?creator") v5("?dod"):::projected v3("?inception"):::projected v1("?item"):::projected v2("?url") v1 --"wdt:P4765"--> v2 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; f0[["year-from-dateTime(?dod) > '1923^^xsd:integer'"]] f0 --> v5 v1 --"wdt:P170"--> v4 v4 --"wdt:P570"--> v5 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P571".-> v3 end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; f1[["year-from-dateTime(?inception) > '1923^^xsd:integer'"]] f1 --> v3 v1 --"wdt:P571"--> v3 subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P170".-> v4 v4 --"wdt:P570"--> v5 end end union0r <== or ==> union0l end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P170".-> v4 v4 --"wdt:P27"--> v6 end