query-6cf580f3bb3e7f9c7e3eba46d0a1870d
SPARQL query
Use at
- https://query.wikidata.org/sparql
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/>
SELECT DISTINCT (STRAFTER(STR(?item), STR(wd:)) AS ?id) WHERE {
?item p:P39 ?ps .
?ps ps:P39 wd:Q27169 ; pq:P2937 wd:Q17315694 .
FILTER NOT EXISTS { ?ps pq:P582 [] }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?id")
v2("?item"):::projected
v1("?ps")
a1((" "))
c4(["wd:Q27169"]):::iri
c6(["wd:Q17315694"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"p:qualifier/P582"--> e0a1
e0v1("?ps"):::projected
e0a1((" ")):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> a1
v1 --"p:qualifier/P582"--> a1
v2 --"p:P39"--> v1
v1 --"p:statement/P39"--> c4
v1 --"p:qualifier/P2937"--> c6
bind1[/"substring-after(str(?item),str('wd:'))"/]
v2 --o bind1
bind1 --as--o v3