what character in a book has a parent who is an queen consort?
Entity Entity Entity Entity Entity Entity Entity
m.04ly31 m.01xh7 m.0l0l1 m.03g2w m.0bwknw7 m.0h0_x m.0ldrt
Troilus Cassandra Helenus Hector Polydorus Paris Deiphobus
class class entity
book.book_character theater.theater_character m.016vfy
book.book_character theater.theater_character fictional_universe.character_rank
Book Character Theater Character Queen consort
none none none
fictional_universe.fictional_character.parents fictional_universe.fictional_character.rank
Parents Rank
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 :book.book_character . 
?x1 :type.object.type :theater.theater_character . 
VALUES ?x2 { :m.016vfy } 
?x0 :fictional_universe.fictional_character.parents ?x1 . 
?x1 :fictional_universe.fictional_character.rank ?x2 . 
FILTER ( ?x0 != ?x1 && ?x0 != ?x2 && ?x1 != ?x2  )
}
}
(AND book.book_character (JOIN fictional_universe.fictional_character.parents (JOIN fictional_universe.fictional_character.rank m.016vfy)))