Using SPARQL I want to show all French embassies in Liberia (spoiler: there is exactly one)
So I wrote this naive query:
SELECT ?item WHERE {
?item wdt:P17 wd:Q1014. # country: Liberia
?item wdt:P31 wd:Q3917681. # instance of: embassy
?item wdt:P137 wd:Q142. # operated by: France
}
PROBLEM: It finds zero items. Even though there is such an item in Liberia, more exactly it is located in the administrative territorial entity of "Monrovia", which itself has a country value of "Liberia".
More generally, I want to get ALL Wikidata items that are in a particular country. How to do?
It must also work if you replace Q1014 (Liberia) with Q183 (Germany), which is even trickier.