query-dc6f1daf58aead2a1db8768a6161b764
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
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 ?item ?itemLabel ?P580 ?P580Label ?P768 ?P768Label ?P2715 ?P2715Label
WHERE
{
?item p:P39 ?stat .
?stat ps:P39 wd:Q29169698 .
filter not exists {?stat pq:P582 [] . }
OPTIONAL { ?stat pq:P580 ?P580 . }
OPTIONAL { ?stat pq:P768 ?P768 . }
OPTIONAL { ?stat pq:P2715 ?P2715 . }
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("?P2715"):::projected
v3("?P580"):::projected
v4("?P768"):::projected
v2("?item"):::projected
v1("?stat")
a1((" "))
c9(["bd:serviceParam"]):::iri
c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c4(["wd:Q29169698"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"p:qualifier/P582"--> e0a1
e0v1("?stat"):::projected
e0a1((" ")):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> a1
v1 --"p:qualifier/P582"--> a1
v2 --"p:P39"--> v1
v1 --"p:statement/P39"--> c4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:qualifier/P580".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:qualifier/P768".-> v4
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:qualifier/P2715".-> v5
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end