what countries are ruled by louise of hesse-kassel and her family?
Entity Entity Entity Entity
m.0k6nt m.05b4w m.088q1s m.02rtfb5
Denmark Norway Kingdom of Greece Kingdom of Iceland
class class entity
royalty.kingdom royalty.royal_line m.05xl9b
royalty.kingdom royalty.royal_line people.family_member
Kingdom Royal line Louise of Hesse-Kassel
none none none
royalty.royal_line.kingdom_s_ruled people.family_member.family
Kingdom(s) ruled Family
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.05xl9b } 
?x1 :royalty.royal_line.kingdom_s_ruled ?x0 . 
?x2 :people.family_member.family ?x1 . 
FILTER ( ?x0 != ?x1 && ?x0 != ?x2 && ?x1 != ?x2  )
}
}
(AND royalty.kingdom (JOIN (R royalty.royal_line.kingdom_s_ruled) (JOIN (R people.family_member.family) m.05xl9b)))