query-75334c27c8dac1c1a97bd1029ff5f5bb
Demonym of a country(P1549) for a particular languageFor example, the demonym of Canada in English should just return "Canadian". How would I go about doing this? SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } does not work on demonym labels. You should use FILTER and LANG on P1549:
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?demonym
WHERE {
wd:Q16 wdt:P1549 ?demonym .
FILTER (LANG(?demonym) = "en") .
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?demonym"):::projected
c2(["wd:Q16"]):::iri
f0[["?demonym = 'en'"]]
f0 --> v1
c2 --"wdt:P1549"--> v1