which royal line is preceded by house of holstein-gottorp (swedish line) and succeeded by house of vasa?
Entity
m.02bcc0
House of Oldenburg
class entity entity
royalty.royal_line m.019ns3 m.0297pw
royalty.royal_line royalty.royal_line royalty.royal_line
Royal line House of Vasa House of Holstein-Gottorp (Swedish line)
none none none
royalty.royal_line.succeeded_by royalty.royal_line.preceded_by
Succeeded by 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.royal_line . 
VALUES ?x1 { :m.019ns3 } 
VALUES ?x2 { :m.0297pw } 
?x0 :royalty.royal_line.succeeded_by ?x1 . 
?x2 :royalty.royal_line.preceded_by ?x0 . 
FILTER ( ?x0 != ?x1 && ?x0 != ?x2 && ?x1 != ?x2  )
}
}
(AND royalty.royal_line (AND (JOIN royalty.royal_line.succeeded_by m.019ns3) (JOIN (R royalty.royal_line.preceded_by) m.0297pw)))