which exoplanet has constellation scorpius?
Entity Entity
m.01nc77 m.04gg8n4
PSR B1620-26 b HD 147513 b
class entity
base.exoplanetology.exoplanet m.06pgz
base.exoplanetology.exoplanet astronomy.constellation
Exoplanet Scorpius
none none
base.exoplanetology.exoplanet.constellation
Constellation
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX : <http://rdf.freebase.com/ns/> 
SELECT (?x0 AS ?value) WHERE {
SELECT DISTINCT ?x0  WHERE { 
?x0 :type.object.type :base.exoplanetology.exoplanet . 
VALUES ?x1 { :m.06pgz } 
?x0 :base.exoplanetology.exoplanet.constellation ?x1 . 
FILTER ( ?x0 != ?x1  )
}
}
(AND base.exoplanetology.exoplanet (JOIN base.exoplanetology.exoplanet.constellation m.06pgz))