mercury belongs to which star system?
Entity
m.06p5g
Solar System
class entity
astronomy.star_system m.09cy8
astronomy.star_system astronomy.planet
Star System Mercury
none none
astronomy.star_system.planets
Planets
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 :astronomy.star_system . 
VALUES ?x1 { :m.09cy8 } 
?x0 :astronomy.star_system.planets ?x1 . 
FILTER ( ?x0 != ?x1  )
}
}
(AND astronomy.star_system (JOIN astronomy.star_system.planets m.09cy8))