query-36076d06254b445bb9f28fee0d5a7790
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT distinct ?item ?itemLabel
WHERE
{
{?item p:P1399 ?stat .
# No references
filter not exists {?stat prov:wasDerivedFrom [] .}
}
UNION
{?item p:P1050 ?stat2 .
# No references
filter not exists {?stat2 prov:wasDerivedFrom [] .}
}
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;
v2("?item"):::projected
v1("?stat")
v3("?stat2")
a1((" "))
a2((" "))
c5(["bd:serviceParam"]):::iri
c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"prov:wasDerivedFrom"--> e0a1
e0v1("?stat2"):::projected
e0a1((" ")):::projected
end
f0--EXISTS--> f0e0
f0 --> v3
f0 --> c1
f0 --> a2
v3 --"prov:wasDerivedFrom"--> a2
v2 --"p:P1050"--> v3
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
f1[["not "]]
subgraph f1e1["Exists Clause"]
e1v1 --"prov:wasDerivedFrom"--> e1a1
e1v1("?stat"):::projected
e1a1((" ")):::projected
end
f1--EXISTS--> f1e1
f1 --> v1
f1 --> c1
f1 --> a1
v1 --"prov:wasDerivedFrom"--> a1
v2 --"p:P1399"--> v1
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end