find the ships of class sc-497-class submarine chaser.
Entity Entity Entity Entity Entity
m.05p2zqd m.05p3yl8 m.05q9qs6 m.05qb02q m.05q53y0
USS SC-498 USS SC-497 USS SC-500 USS SC-499 USS SC-501
class entity
boats.ship m.05p59_v
boats.ship boats.ship_class
Ship SC-497-class submarine chaser
none none
boats.ship.ship_class
Ship Class
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 :boats.ship . 
VALUES ?x1 { :m.05p59_v } 
?x0 :boats.ship.ship_class ?x1 . 
FILTER ( ?x0 != ?x1  )
}
}
(AND boats.ship (JOIN boats.ship.ship_class m.05p59_v))