query-eb6d7a4e20e59a4bb03d2ce5ee207a93
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 WHERE {
VALUES ?p31 { wd:Q29414133 wd:Q16739079 }
?item wdt:P131 wd:Q59133 .
?item p:P31 ?p31stm .
?p31stm ps:P31 ?p31 .
OPTIONAL { ?p31stm pq:P582 ?p582 }
FILTER(!BOUND(?p582))
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?item"):::projected
v1("?itemLabel"):::projected
v3("?p31")
v5("?p31stm")
v2("?p582")
c2(["wd:Q59133"]):::iri
c7(["bd:serviceParam"]):::iri
c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["not bound(?p582)"]]
f0 --> v2
bind1[/VALUES ?p31/]
bind1-->v3
bind10(["wd:Q29414133"])
bind10 --> bind1
bind11(["wd:Q16739079"])
bind11 --> bind1
v4 --"p:direct/P131"--> c2
v4 --"p:P31"--> v5
v5 --"p:statement/P31"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:qualifier/P582".-> v2
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end