query-10597fd3aa0bcf00de913364e3cbc3d2
SPARQL query 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 ?position ?positionLabel ?start
WHERE
{
?item wdt:P31 wd:Q5 ; p:P39 ?ps .
?ps ps:P39 ?position ; pq:P580 ?start .
FILTER NOT EXISTS { ?ps pq:P582 [] }
?position wdt:P279 wd:Q889821 .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?positionLabel
Query found at
- https://www.wikidata.org/wiki/Talk:Q42688505
- https://www.wikidata.org/wiki/Wikidata:Project_chat/Archive/2017/11
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?item"):::projected
v4("?position"):::projected
v1("?positionLabel"):::projected
v2("?ps")
v5("?start"):::projected
a1((" "))
c10(["bd:serviceParam"]):::iri
c3(["wd:Q5"]):::iri
c8(["wd:Q889821"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"p:qualifier/P582"--> e0a1
e0v1("?ps"):::projected
e0a1((" ")):::projected
end
f0--EXISTS--> f0e0
f0 --> v2
f0 --> c1
f0 --> a1
v2 --"p:qualifier/P582"--> a1
v3 --"p:direct/P31"--> c3
v3 --"p:P39"--> v2
v2 --"p:statement/P39"--> v4
v2 --"p:qualifier/P580"--> v5
v4 --"p:direct/P279"--> c8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end