query-4fe05e39ab9762be06cd5481ade0d673
Dagomba people who do not have an English Wikipedia article (showing their image) SELECT ?item ?itemLabel ?image WHERE { ?item wdt:P172 wd:Q592821. OPTIONAL { ?item wdt:P18 ?image. } OPTIONAL { ?sitelink schema:about ?item; schema:inLanguage "en". } FILTER(!(BOUND(?sitelink))) ?item wdt:P31 wd:Q5. SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }
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 schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Dagomba people who do not have an English Wikipedia article (showing their image)
SELECT ?item ?itemLabel ?image WHERE {
?item wdt:P172 wd:Q592821.
OPTIONAL { ?item wdt:P18 ?image. }
OPTIONAL {
?sitelink schema:about ?item;
schema:inLanguage "en".
}
FILTER(!(BOUND(?sitelink)))
?item wdt:P31 wd:Q5.
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;
v3("?image"):::projected
v2("?item"):::projected
v1("?sitelink")
c10(["bd:serviceParam"]):::iri
c8(["wd:Q5"]):::iri
c2(["wd:Q592821"]):::iri
c6(["en"]):::literal
c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["not bound(?sitelink)"]]
f0 --> v1
v2 --"wdt:P172"--> c2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P18".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."schema:about".-> v2
v1 --"schema:inLanguage"--> c6
end
v2 --"wdt:P31"--> c8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end