Neuruppin has two “instance of” statements: “city” and “municipality of Germany”. The second statement has preferred rank, and the first one has normal rank. The wdt: only includes “truthy” statements, that is, statements with the highest rank, and never statements of deprecated rank. The “municipality of Germany” statement has higher rank than the “city” statement, so Neuruppin is not wdt:P31 wd:Q515. In this case, you want to use the full statements: p: points at the statement node, and ps: points from there to the statement value, so the full path from Q16085 to Q515 is ?item p:P31/ps:P31 wd:Q515. Here’s the fixed query: http://tinyurl.com/k68skwt
Cheers,
Lucas
Hello. I'm trying to run a quite simple query on WDQS. I would like to get all instances of cities in Germany:
But there are a number of cities which I'm missing at the result … such as
Michael
_______________________________________________ Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata