what kingdom is ruled by a royal line preceding house of wettin?
Entity Entity Entity Entity Entity Entity Entity
m.06mkj m.04g61 m.0d0q4 m.0cn_tpv m.033bdl m.05crmm m.0327cv
Spain Luxembourg Kingdom of the Two Sicilies Kingdom of France Kingdom of Navarre Kingdom of Etruria Duchy of Parma
class class entity
royalty.kingdom royalty.royal_line m.02ryw5
royalty.kingdom royalty.royal_line royalty.royal_line
Kingdom Royal line House of Wettin
none none none
royalty.royal_line.kingdom_s_ruled royalty.royal_line.preceded_by
Kingdom(s) ruled Preceded 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 :royalty.kingdom . 
?x1 :type.object.type :royalty.royal_line . 
VALUES ?x2 { :m.02ryw5 } 
?x1 :royalty.royal_line.kingdom_s_ruled ?x0 . 
?x2 :royalty.royal_line.preceded_by ?x1 . 
FILTER ( ?x0 != ?x1 && ?x0 != ?x2 && ?x1 != ?x2  )
}
}
(AND royalty.kingdom (JOIN (R royalty.royal_line.kingdom_s_ruled) (JOIN (R royalty.royal_line.preceded_by) m.02ryw5)))