What is {has municipalities} of {sovereign state} of {Guarulhos} ?
What are the districts of the imperial state of Guarulhos?
What are the municipalities of the sovereign state of Guarulhos?
SELECT ?s WHERE { ?z property:contains_administrative_territorial_entity ?s . resource:Guarulhos property:country ?z }
SELECT ?answer WHERE { ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q184409> . ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P17>. ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?X . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?X. ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P150> . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?answer . }
SELECT ?answer WHERE { wd:Q184409 wdt:P17 ?X . ?X wdt:P150 ?answer}
São Paulo Paraná Paraíba Minas Gerais Pará Rio Grande do Sul Amazonas Ceará Amapá Bahia Acre Alagoas Pernambuco Santa Catarina Rio de Janeiro Goiás Maranhão Roraima Piauí Mato Grosso Espírito Santo Rondônia Rio Grande do Norte Mato Grosso do Sul Tocantins Sergipe Federal District