query-2026605b966a1874d2d8e62d94b2d4ff
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT distinct ?item ?itemLabel
WHERE
{
{?item p:P1399 ?stat .
# imported from Wikimedia project (P143) and/or Wikimedia import URL (P4656)
{?stat prov:wasDerivedFrom/pr:P143 [] . } UNION
{?stat prov:wasDerivedFrom/pr:P4656 [] . }
}
UNION
{?item p:P1050 ?stat2 .
# imported from Wikimedia project (P143) and/or Wikimedia import URL (P4656)
{?stat2 prov:wasDerivedFrom/pr:P143 [] . } UNION
{?stat2 prov:wasDerivedFrom/pr:P4656 [] . }
}
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;
v1("?item"):::projected
v2("?stat")
v3("?stat2")
a2((" "))
a4((" "))
a6((" "))
a8((" "))
a1((" "))
a3((" "))
a5((" "))
a7((" "))
c7(["bd:serviceParam"]):::iri
c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v1 --"p:P1050"--> v3
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
v3 --"prov:wasDerivedFrom"--> a7
a7 --"p:reference/P4656"--> a8
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v3 --"prov:wasDerivedFrom"--> a5
a5 --"p:reference/P143"--> a6
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"p:P1399"--> v2
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
v2 --"prov:wasDerivedFrom"--> a3
a3 --"p:reference/P4656"--> a4
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
v2 --"prov:wasDerivedFrom"--> a1
a1 --"p:reference/P143"--> a2
end
union2r <== or ==> union2l
end
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end