bharat heavy electricals limited is the builder of which class of locomotives?
Entity Entity
m.0gcjbg m.0gcjms
Indian locomotive class WAG-7 Indian locomotive class WAG-5
class entity
rail.locomotive_class m.03ljpz
rail.locomotive_class rail.locomotive_builder
Locomotive class bharat heavy electricals limited
none none
rail.locomotive_class.built_by
Built by
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 :rail.locomotive_class . 
VALUES ?x1 { :m.03ljpz } 
?x0 :rail.locomotive_class.built_by ?x1 . 
FILTER ( ?x0 != ?x1  )
}
}
(AND rail.locomotive_class (JOIN rail.locomotive_class.built_by m.03ljpz))