what is the organism classification whose earliest fossil record is a geologic time period during which santana formation is formed?
Entity
m.02w_543
Melanopsis
class class entity
biology.organism_classification time.geologic_time_period m.05rw82
biology.organism_classification time.geologic_time_period geology.geological_formation
Organism Classification Geologic time period Santana Formation
none none none
biology.organism_classification.earliest_fossil_record geology.geological_formation.formed_during_period
Earliest fossil record Formed during period
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 :biology.organism_classification . 
?x1 :type.object.type :time.geologic_time_period . 
VALUES ?x2 { :m.05rw82 } 
?x0 :biology.organism_classification.earliest_fossil_record ?x1 . 
?x2 :geology.geological_formation.formed_during_period ?x1 . 
FILTER ( ?x0 != ?x1 && ?x0 != ?x2 && ?x1 != ?x2  )
}
}
(AND biology.organism_classification (JOIN biology.organism_classification.earliest_fossil_record (JOIN (R geology.geological_formation.formed_during_period) m.05rw82)))