SELECT DISTINCT ?uri WHERE { <http://dbpedia.org/resource/Baja_California_Peninsula> <http://dbpedia.org/ontology/location> ?uri. <http://dbpedia.org/resource/WEPG> <http://dbpedia.org/property/city> ?uri . ?uri <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/ontology/Continent>}
What continent of the world has Baja California peninsula and also has WEPG in one of its cities?
SELECT DISTINCT ?v WHERE { resource:W_E_P_G property:city ?v . ?v rdf:type ontology:Continent . resource:Baja_California_Peninsula property:location ?v }
North America
The continent where Baja California Peninsula is located and has WEPG in one of its cities is [North America].
The continent where both Baja California and WGG is located is [North America].
[North America] is the location of the  California peninsula and city of the WEPG.
[North America] is the place where they are located.