which comet has the last perihelion on 1990-04-09?
Entity
m.09v4w2t
C/1989 X1
class literal
astronomy.comet 1990-04-09^^http://www.w3.org/2001/XMLSchema#date
astronomy.comet type.datetime
Comet 1990-04-09
none none
astronomy.comet.last_perihelion
Last perihelion
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.comet . 
VALUES ?x1 { "1990-04-09-08:00"^^<http://www.w3.org/2001/XMLSchema#date> } 
?x0 :astronomy.comet.last_perihelion ?x1 . 
FILTER ( ?x0 != ?x1  )
}
}
(AND astronomy.comet (JOIN astronomy.comet.last_perihelion 1990-04-09^^http://www.w3.org/2001/XMLSchema#date))