query-e73872ba31bc1b896b2ac1622189a6ca
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?item ?value ?pit WHERE
{
?item p:P1087 ?stmt .
optional {?stmt ps:P1087 ?value.}
optional {?stmt pq:P585 ?pit.}
optional { ?stmt prov:wasDerivedFrom ?where . }
filter not exists {?where pr:P248 [].}
filter not exists {?where pr:P854 [].}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?item"):::projected
v5("?pit"):::projected
v3("?stmt")
v4("?value"):::projected
v1("?where")
a2((" "))
a1((" "))
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"p:reference/P854"--> e0a1
e0v1("?where"):::projected
e0a1((" ")):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> a1
v1 --"p:reference/P854"--> a1
f1[["not "]]
subgraph f1e1["Exists Clause"]
e1v1 --"p:reference/P248"--> e1a1
e1v1("?where"):::projected
e1a1((" ")):::projected
end
f1--EXISTS--> f1e1
f1 --> v1
f1 --> c2
f1 --> a2
v1 --"p:reference/P248"--> a2
v2 --"p:P1087"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:statement/P1087".-> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:qualifier/P585".-> v5
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v3 -."prov:wasDerivedFrom".-> v1
end