query-30cac5007eec8062a39a1bec14e2f8be
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?person ?personLabel {
?item wdt:P31 wd:Q27971968 ; wdt:P131 wd:Q7961747
FILTER NOT EXISTS { ?item wdt:P576 ?end } .
OPTIONAL {
?person p:P39 ?positionStatement .
?positionStatement ps:P39 wd:Q16707842; pq:P2937 wd:Q29974940 ; pq:P768 ?item .
}
SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
}
ORDER BY ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?end")
v2("?item"):::projected
v1("?itemLabel"):::projected
v4("?person"):::projected
v5("?positionStatement")
c8(["wd:Q16707842"]):::iri
c3(["wd:Q27971968"]):::iri
c15(["en"]):::literal
c10(["wd:Q29974940"]):::iri
c5(["wd:Q7961747"]):::iri
c13(["bd:serviceParam"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"p:direct/P576"--> e0v2
e0v2("?end"):::projected
e0v1("?item"):::projected
end
f0--EXISTS--> f0e0
f0 --> v2
f0 --> c1
f0 --> v3
v2 --"p:direct/P576"--> v3
v2 --"p:direct/P31"--> c3
v2 --"p:direct/P131"--> c5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:P39".-> v5
v5 --"p:statement/P39"--> c8
v5 --"p:qualifier/P2937"--> c10
v5 --"p:qualifier/P768"--> v2
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c13 --"wikibase:language"--> c15
end