query-c0486d0d7e6f083f123e99b091e275de
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 ?dss ?de ?fr ?it WHERE {
?item p:P902 ?stat.
?stat ps:P902 ?dss;
prov:wasDerivedFrom ?stat2.
{
OPTIONAL { ?stat2 pr:P1476 ?de. filter(lang(?de)="de") }
OPTIONAL { ?stat2 pr:P1476 ?fr. filter(lang(?fr)="fr") }
OPTIONAL { ?stat2 pr:P1476 ?it. filter(lang(?it)="it") }
}
UNION
{
OPTIONAL { ?stat pq:P1476 ?de. filter(lang(?de)="de") }
OPTIONAL { ?stat pq:P1476 ?fr. filter(lang(?fr)="fr") }
OPTIONAL { ?stat pq:P1476 ?it. filter(lang(?it)="it") }
}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?de"):::projected
v3("?dss"):::projected
v6("?fr"):::projected
v5("?it"):::projected
v1("?item"):::projected
v2("?stat")
v4("?stat2")
v1 --"p:P902"--> v2
v2 --"p:statement/P902"--> v3
v2 --"prov:wasDerivedFrom"--> v4
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:qualifier/P1476".-> v7
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:qualifier/P1476".-> v6
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:qualifier/P1476".-> v5
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:reference/P1476".-> v7
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:reference/P1476".-> v6
end
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:reference/P1476".-> v5
end
end
union0r <== or ==> union0l
end