?country wdt:P31 wd:Q6256 .
This (wdt = wikidata truthy) only searches for items that have P31=Q6256
with highest set rank.
This is despite Finland being an instance (P31) of country (Q6256):
Finnland has P31=Q6256 with rank normal, but P31=Q3624078 with preferred
rank.
You have to either include Q3624078 too, or replace "wdt" by something that
finds also lower ranks:
?country p:P31/ps:P31 wd:Q6256 .
See here about the background of Ranks:
https://www.wikidata.org/wiki/Help:Ranking
Cheers,
M
Have I got something wrong?
Many thanks,
AJP
p.s. this query gets a list of countries the exist on cities but not as
entities being an instance of country. Though actually most of them do
have "instance of" country.
SELECT ?country ?countryLabel {
SERVICE wikibase:label { bd:serviceParam wikibase:language
"[AUTO_LANGUAGE]" }
{
SELECT ?country WHERE {
{
?city wdt:P31 wd:Q515 .
?city wdt:P17 ?country .
}
MINUS
{
?country wdt:P31 wd:Q6256 .
}
} GROUP BY ?country
}
} ORDER BY ?countryLabel
_______________________________________________
Wikidata-tech mailing list
Wikidata-tech(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-tech
--
Michael F. Schönitzer
Wikimedia Deutschland e. V. | Tempelhofer Ufer 23-24 | 10963 Berlin
Tel. (030) 219 158 26-0
https://wikimedia.de
Unsere Vision ist eine Welt, in der alle Menschen am Wissens der Menschheit
teilhaben, es nutzen und mehren können. Helfen Sie uns dabei!
https://spenden.wikimedia.de
Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e. V.
Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg unter
der Nummer 23855 B. Als gemeinnützig anerkannt durch das Finanzamt für
Körperschaften I Berlin, Steuernummer 27/029/42207.