query-8a74ee119e6396f1d3d7a607b85de12e
Items that should have VD 18 identifiersFiltering all publications results in a timeout but selected publication types from the 18th century can be queried like this:
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 bd: <http://www.bigdata.com/rdf#>
SELECT ?p ?pLabel ?pDescription ?year ?vd18 WHERE {
# books and periodicals (all publications would lead to timeout)
{ { ?p wdt:P31/wdt:P279* wd:Q571 } UNION
{ ?p wdt:P31/wdt:P279* wd:Q1002697 } }
# filter by date
?p wdt:P577 ?date .
FILTER (year(?date) >= 1701) .
FILTER (year(?date) <= 1800) .
# Publications with German or unknown language
OPTIONAL {
?p wdt:P407 ?lang
FILTER NOT EXISTS { ?p wdt:P407 wd:Q188 }
}
FILTER (!BOUND(?lang)) .
# get VD 18 ID, year, and labels
OPTIONAL { ?p wdt:P6135 ?vd18 }
BIND (year(?date) AS ?year) .
SERVICE wikibase:label { bd:serviceParam wikibase:language "de". }
} ORDER BY DESC(?vd18)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?date")
v2("?lang")
v4("?p"):::projected
v1("?vd18"):::projected
v5("?year"):::projected
a1((" "))
a2((" "))
c14(["de"]):::literal
c8(["wd:Q1002697"]):::iri
c12(["bd:serviceParam"]):::iri
c4(["wd:Q188"]):::iri
c7(["wd:Q571"]):::iri
f0[["not bound(?lang)"]]
f0 --> v2
f1[["year-from-dateTime(?date) <= '1800^^xsd:integer'"]]
f1 --> v3
f2[["year-from-dateTime(?date) >= '1701^^xsd:integer'"]]
f2 --> v3
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v4 --"wdt:P31"--> a2
a2 --"wdt:P279"--> c8
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v4 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c7
end
union0r <== or ==> union0l
end
v4 --"wdt:P577"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P407".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P6135".-> v1
end
bind3[/"year-from-dateTime(?date)"/]
v3 --o bind3
bind3 --as--o v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end