query-61cc9ddc2534853fb04f12c67ea0e621
Chain of editioningI've tried to get long chains of A "has edition" B "has edition" ะก and so on, but all I got is a long list of cycles:
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT distinct ?p1 ?p1Label ?p2 ?p3 ?p4 ?p5 ?p6 ?p7 WHERE {
?p1 wdt:P629 ?p2.
?p2 wdt:P629 ?p3.
?p3 wdt:P629 ?p4.
?p4 wdt:P629 ?p5.
?p5 wdt:P629 ?p6.
OPTIONAL {?p6 wdt:P629 ?p7.}
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;
v1("?p1"):::projected
v2("?p2"):::projected
v3("?p3"):::projected
v4("?p4"):::projected
v5("?p5"):::projected
v6("?p6"):::projected
v7("?p7"):::projected
c3(["bd:serviceParam"]):::iri
c5(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v1 --"wdt:P629"--> v2
v2 --"wdt:P629"--> v3
v3 --"wdt:P629"--> v4
v4 --"wdt:P629"--> v5
v5 --"wdt:P629"--> v6
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v6 -."wdt:P629".-> v7
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c3 --"wikibase:language"--> c5
end