Closed albertvillanova closed 4 years ago
Add subclass*:
?item p:{instance_of} ?st .
?st ps:{instance_of}/wdt:{subclass}* wd:{administrative_division} .
There is a problem with current solution:
ps:{instance_of}/wdt:{subclass}* wd:{administrative_division}
because:
I have commented it in Wikidata: https://www.wikidata.org/wiki/Wikidata:Project_chat#Why_'former_X'_is_subclass_of_'X'? but no solution has been given yet.
Note, that there is no problem with other administrative divisions:
Better remove subclass* and explicitly enumerate all administrative divisions with VALUES:
VALUES ?administrative_division { wd:Q484170 wd:Q2989454 } # [commune of France, commune nouvelle]
?item p:P31 ?st .
?st ps:P31 ?administrative_division .
The hierarchy of classes is: