andrew barclay sons & co. builds what class of locomotives?
Entity Entity Entity Entity Entity
m.07v4gx m.02r82y m.02rp7t m.06lk43 m.0b6xxg
LMS Fowler Class 4F British Rail Class 01 British Rail Class 06 Hunslet Austerity 0-6-0ST British Rail Class D2/5
class entity
rail.locomotive_class m.05zkbp
rail.locomotive_class rail.locomotive_builder
Locomotive class Andrew Barclay Sons & Co.
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.05zkbp } 
?x0 :rail.locomotive_class.built_by ?x1 . 
FILTER ( ?x0 != ?x1  )
}
}
(AND rail.locomotive_class (JOIN rail.locomotive_class.built_by m.05zkbp))