Open
Description
support the following case:
create table t(a int);
insert into t values(1), (2);
select * from (select a + 1 as a from t) as t where (select sum(a) from t as t1 where t1.a < t.a) = 1;
Originally posted by @leiysky in #6632 (comment)