query-4b21777bbabb5b429101800f910c0a79
works without proper qualifiers which were published more than 95 years ago Count them
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 (count( ?item ) as ?cnt) {
?item wdt:P6216 ?copyright .
VALUES ?copyright { wd:Q19652 wd:Q15687061 } # P6216 main value = public domain
?item wdt:P577 ?dop .
FILTER(YEAR(?dop) < 1924) # exclude if date of publication < 1924
FILTER NOT EXISTS { ?item p:P6216/pq:P1001 wd:Q30} # exclude if P1001 for USA present
FILTER NOT EXISTS { ?item p:P6216/pq:P459 wd:Q47246828 } # exclude if P459 for PD-1923 present
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("?cnt")
v4("?copyright")
v2("?dop")
v1("?item"):::projected
a2((" "))
a1((" "))
c3(["wd:Q47246828"]):::iri
c10(["bd:serviceParam"]):::iri
c5(["wd:Q30"]):::iri
c12(["#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:Q47246828"]):::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:Q30"]):::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(?dop) < '1924^^xsd:integer'"]]
f2 --> v2
v1 --"p:direct/P6216"--> v4
bind3[/VALUES ?copyright/]
bind3-->v4
bind30(["wd:Q19652"])
bind30 --> bind3
bind31(["wd:Q15687061"])
bind31 --> bind3
v1 --"p:direct/P577"--> v2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end
bind5[/"count(?item)"/]
v1 --o bind5
bind5 --as--o v4