query-53fc41338c6de39f8ea4539a908af2fd
(P179)part of the series (P1545)series ordinal
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?book ?bookLabel ?seriesLabel ?number ?followsLabel ?followed_byLabel
WHERE
{
?book wdt:P50 wd:Q1701679 . # book by John Sandford
OPTIONAL
{
?book p:P179 ?series_statement .
?series_statement ps:P179 ?series .
OPTIONAL { ?series_statement pq:P1545 ?number . }
OPTIONAL { ?series_statement pq:P155 ?follows . }
OPTIONAL { ?series_statement pq:P156 ?followed_by . }
}
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
}
ORDER BY ?series ?number
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?book"):::projected
v6("?followed_by")
v5("?follows")
v2("?number"):::projected
v1("?series")
v4("?series_statement")
c9(["bd:serviceParam"]):::iri
c11(["en"]):::literal
c2(["wd:Q1701679"]):::iri
v3 --"p:direct/P50"--> c2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:P179".-> v4
v4 --"p:statement/P179"--> v1
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P1545".-> v2
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P155".-> v5
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P156".-> v6
end
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end