What is {has capital} of {Majorca}, that has {human population} is {434516} ?
With a population of 434516, what is the capital of Majorca?
With a population of 434516, what is the capital of Majorca?
SELECT ?u WHERE { ?u property:population ?p . resource:Majorca property:capital ?u . FILTER ( ?p = 434516 ) }
SELECT ?answer WHERE { ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q8828> . ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P36>. ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?answer . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?answer. ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P1082> . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <434516> . }
SELECT ?answer WHERE { wd:Q8828 wdt:P36 ?answer . ?answer wdt:P1082 ?x FILTER(contains(?x , '434516'))}