query-26466d2d0446fa3c4e4dc36c7cc8d512
TODO
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 DISTINCT ?work ?workLabel ?earliestEdition (year(?earliestEditionReleaseDate) AS ?year) {
?work wdt:P31 wd:Q7725634.
?work wdt:P747 ?earliestEdition.
?earliestEdition wdt:P577 ?earliestEditionReleaseDate .
FILTER (!isBLANK(?earliestEditionReleaseDate))
FILTER NOT EXISTS {
?work wdt:P747 ?edition .
?edition wdt:P577 ?editionReleaseDate .
FILTER (?editionReleaseDate < ?earliestEditionReleaseDate )
}
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;
v5("?earliestEdition"):::projected
v2("?earliestEditionReleaseDate"):::projected
v4("?edition")
v1("?editionReleaseDate")
v3("?work"):::projected
v6("?year")
c6(["bd:serviceParam"]):::iri
c4(["wd:Q7725634"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0f0[["?editionReleaseDate < ?earliestEditionReleaseDate"]]
e0f0 --> e0v1
e0f0 --> e0v2
e0v3 --"wdt:P747"--> e0v4
e0v4 --"wdt:P577"--> e0v1
e0v2("?earliestEditionReleaseDate"):::projected
e0v4("?edition"):::projected
e0v1("?editionReleaseDate"):::projected
e0v3("?work"):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> v2
f0 --> v3
f0 --> c1
f0 --> v4
f0 --> c2
f1[["?editionReleaseDate < ?earliestEditionReleaseDate"]]
f1 --> v1
f1 --> v2
v3 --"wdt:P747"--> v4
v4 --"wdt:P577"--> v1
f2[["not isBlank(?earliestEditionReleaseDate)"]]
f2 --> v2
v3 --"wdt:P31"--> c4
v3 --"wdt:P747"--> v5
v5 --"wdt:P577"--> v2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end
bind3[/"year-from-dateTime(?earliestEditionReleaseDate)"/]
v2 --o bind3
bind3 --as--o v6