create table t1 (a int, b int, c int);
create table t2 (a int, b int, c int);
create table t3 (a int, b int, c int);


explain (costs off, verbose)
select * from t1
where t1.a in (select a from t2 where t2.b = t1.b);


explain (costs off, verbose)
select * from t1
where t1.a in (select a from t2 where t2.b = t1.b
               and t2.c in (select c from t3 where t3.a = t2.a));


explain (costs off, verbose)
select * from t1 where exists
    (select * from t2 where t1.a in (select t3.a from t3 where t3.b = t2.b));
