(select (leftjoin (bgp (triple ?:x ?:v)) (bgp (triple ?:y ?:w)) :TEST (= ?:v 2)) (?:x ?:v ?:y ?:w))