query-690a0d0e5620b1e7d89a018440b849f2
TODO
Use at
- https://query.wikidata.org/sparql
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/>
SELECT ?work ?edition_number ?item ?date (CONCAT(?title, COALESCE((CONCAT(': ', (COALESCE(?subtitle_qualifier, ?subtitle)))), '')) AS ?itemLabel) ?pdf ?isbn13 WHERE {
?work wdt:P31 wd:Q47461344 ; wdt:P50 wd:Q113627075 ; wdt:P136 wd:Q223729.
?work wdt:P747 ?item. ?item wdt:P393 ?edition_number.
OPTIONAL { ?item wdt:P577 ?date. }
OPTIONAL { ?item wdt:P1476 ?title. }
OPTIONAL { ?item p:P1476 ?title_statement. ?title_statement pq:P1680 ?subtitle_qualifier. }
OPTIONAL { ?item wdt:P1680 ?subtitle. }
OPTIONAL { ?item wdt:P212 ?isbn13. }
OPTIONAL { ?item p:P953 ?link_statement. ?link_statement ps:P953 ?pdf; pq:P2701 wd:Q42332. }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?date"):::projected
v3("?edition_number"):::projected
v9("?isbn13"):::projected
v2("?item"):::projected
v12("?itemLabel")
v10("?link_statement")
v11("?pdf"):::projected
v8("?subtitle"):::projected
v7("?subtitle_qualifier"):::projected
v5("?title"):::projected
v6("?title_statement")
v1("?work"):::projected
c18(["wd:Q42332"]):::iri
c4(["wd:Q113627075"]):::iri
c6(["wd:Q223729"]):::iri
c2(["wd:Q47461344"]):::iri
v1 --"p:direct/P31"--> c2
v1 --"p:direct/P50"--> c4
v1 --"p:direct/P136"--> c6
v1 --"p:direct/P747"--> v2
v2 --"p:direct/P393"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P577".-> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P1476".-> v5
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:P1476".-> v6
v6 --"p:qualifier/P1680"--> v7
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P1680".-> v8
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P212".-> v9
end
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:P953".-> v10
v10 --"p:statement/P953"--> v11
v10 --"p:qualifier/P2701"--> c18
end
bind0[/"concat(?title,concat(': ',?subtitle_qualifier?subtitle)'')"/]
v5 --o bind0
v7 --o bind0
v8 --o bind0
bind0 --as--o v12