0

In Wikidata, Russia is marked as both instance of "sovereign state" (Q3624078) and instance of "country" (https://www.wikidata.org/wiki/Q159).

A SPARQL request to https://query.wikidata.org/ with the "sovereign state" in its condition returns Russia:

SELECT DISTINCT ?country ?countryLabel 
WHERE
{
?country wdt:P31 wd:Q3624078 .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?countryLabel

but a SPARQL request with the "country" label does not:

SELECT DISTINCT ?country ?countryLabel 
WHERE
{
?country wdt:P31 wd:Q6256 .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?countryLabel

Why is to so?

logi-kal
  • 7,107
  • 6
  • 31
  • 43
gisly
  • 673
  • 1
  • 8
  • 30
  • `wdt:P31/wdt:P279*` – UninformedUser Dec 11 '18 at 16:20
  • 1
    Right, truthy statements... So based on the answer from StanislavKralin in the question he linked to, it should be `SELECT DISTINCT ?country ?countryLabel WHERE { ?country p:P31 ?statement. ?statement ps:P31 wd:Q6256 . SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } } ORDER BY ?countryLabel` – UninformedUser Dec 12 '18 at 07:48
  • @StanislavKralin, AKSW, thank you very much, I now see the point – gisly Dec 12 '18 at 07:49

0 Answers0