query-795196fd64fac1b18df449c1de84106a
Propertiescountry of citizenship (P27)instance of (P31)country (P17)
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 bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?instanceLabel ?itemDescription WHERE {
?item wdt:P27 wd:Q31.
?item wdt:P31 ?instance.
?item wdt:P17 wd:Q31.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]" }
FILTER( ?instance != wd:Q5 )
}
ORDER BY ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?instance")
v3("?item"):::projected
v1("?itemLabel"):::projected
c7(["bd:serviceParam"]):::iri
c9(["#91;AUTO_LANGUAGE#93;"]):::literal
c3(["wd:Q31"]):::iri
f0[["?instance != 'wd:Q5'"]]
f0 --> v2
v3 --"wdt:P27"--> c3
v3 --"wdt:P31"--> v2
v3 --"wdt:P17"--> c3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end