query-339bcc0e04eb4c835a61f94ba62e1c7f
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 .
?item p:P1050 ?stat2 .
# No references
# filter not exists {?stat prov:wasDerivedFrom [] .}
# filter not exists {?stat2 prov:wasDerivedFrom [] .}
# imported from Wikimedia project (P143) and/or Wikimedia import URL (P4656)
{?stat prov:wasDerivedFrom/pr:P143 [] . } UNION
{?stat 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((" "))
a1((" "))
a3((" "))
c7(["bd:serviceParam"]):::iri
c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v1 --"p:P1399"--> v2
v1 --"p:P1050"--> v3
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v2 --"prov:wasDerivedFrom"--> a3
a3 --"p:reference/P4656"--> a4
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"prov:wasDerivedFrom"--> a1
a1 --"p:reference/P143"--> a2
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end