avonside engine company builds locomotives of which class?
Entity Entity Entity Entity Entity Entity Entity Entity
m.0g0d12 m.0ynw2b5 m.04y4qm m.02qj6k9 m.0g19hm m.0zwrdlv m.09n6s4 m.0gmgfxd
South Devon Railway Remus class CGR 1st Class 4-4-0 1879 GWR Banking Class GWR 1101 Class South Devon Railway Buffalo class NZR L class NZR J class Queensland B12 class locomotive
class entity
rail.locomotive_class m.0cc212
rail.locomotive_class rail.locomotive_builder
Locomotive class Avonside Engine Company
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.0cc212 } 
?x0 :rail.locomotive_class.built_by ?x1 . 
FILTER ( ?x0 != ?x1  )
}
}
(AND rail.locomotive_class (JOIN rail.locomotive_class.built_by m.0cc212))