Question: Which country was ruled by Philip IV of Spain, and is located on the Iberian Peninsula?
Answer(s):
answer: Portugal

SPARQL query:
PREFIX ns: <http://rdf.freebase.com/ns/>
SELECT DISTINCT ?x
WHERE {
FILTER (?x != ns:m.03v9w)
FILTER (!isLiteral(?x) OR lang(?x) = '' OR langMatches(lang(?x), 'en'))
ns:m.03v9w ns:location.location.partiallycontains ?y .
?y ns:location.partial_containment_relationship.partially_contains ?x .
?x ns:base.biblioness.bibs_location.loc_type ?sk0 .
FILTER (str(?sk0) = "Country")
?x ns:royalty.kingdom.rulers ns:m.0132m7 . 
}