query-a1965772107a7e08ca92620a3167ce37
PD works without proper qualifiers whos creators died more than 100 years ago
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
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 {
?item wdt:P6216 ?copyright .
VALUES ?copyright { wd:Q19652 wd:Q15687061 } # P6216 main value = public domain
# 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 }.
FILTER(YEAR(?mdod) < 1919) # exclude if date of death < 1919
FILTER NOT EXISTS { ?item p:P6216/pq:P1001 wd:Q60332278} # exclude if P1001 for USA present
FILTER NOT EXISTS { ?item p:P6216/pq:P459 wd:Q29940705} # exclude if P459 for PD-1923 present
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} LIMIT 10
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?copyright")
v4("?creator")
v5("?dod")
v1("?item"):::projected
v6("?mdod")
a2((" "))
a1((" "))
c3(["wd:Q29940705"]):::iri
c5(["wd:Q60332278"]):::iri
c16(["bd:serviceParam"]):::iri
c18(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"p:P6216"--> e0a1
e0a1 --"p:qualifier/P459"--> e0c3
e0v1("?item"):::projected
e0a1((" ")):::projected
e0c3(["wd:Q29940705"]):::iri
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> a1
f0 --> c2
f0 --> c3
v1 --"p:P6216"--> a1
a1 --"p:qualifier/P459"--> c3
f1[["not "]]
subgraph f1e1["Exists Clause"]
e1v1 --"p:P6216"--> e1a1
e1a1 --"p:qualifier/P1001"--> e1c3
e1v1("?item"):::projected
e1a1((" ")):::projected
e1c3(["wd:Q60332278"]):::iri
end
f1--EXISTS--> f1e1
f1 --> v1
f1 --> c1
f1 --> a2
f1 --> c4
f1 --> c5
v1 --"p:P6216"--> a2
a2 --"p:qualifier/P1001"--> c5
f2[["year-from-dateTime(?mdod) < '1919^^xsd:integer'"]]
f2 --> v6
v1 --"p:direct/P6216"--> v4
bind3[/VALUES ?copyright/]
bind3-->v4
bind30(["wd:Q19652"])
bind30 --> bind3
bind31(["wd:Q15687061"])
bind31 --> bind3
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 --"p:direct/P287"--> v4
end
subgraph union4r[" "]
style union4r fill:#abf,stroke-dasharray: 3 3;
v1 --"p:direct/P110"--> v4
end
union4r <== or ==> union4l
end
end
subgraph union3r[" "]
style union3r fill:#abf,stroke-dasharray: 3 3;
v1 --"p:direct/P84"--> v4
end
union3r <== or ==> union3l
end
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
v1 --"p:direct/P655"--> v4
end
union2r <== or ==> union2l
end
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v1 --"p:direct/P170"--> v4
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"p:direct/P50"--> v4
end
union0r <== or ==> union0l
end
v4 --"p:direct/P570"--> v5
bind5[/"max(?dod)"/]
v5 --o bind5
bind5 --as--o v6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c16 --"wikibase:language"--> c18
end