--
-- ### Advanced table alias check
-- 

drop if exists table t1;
create table t1 ( a int not null, b int, c string(20));
drop if exists alias a1;
create alias a1 on t1 ( a as ax, b as bx );

insert into t1 values ( 1, 2, 'XXX');
insert into t1 values ( 2, 3, 'YYY');
insert into t1 values ( 3, 4, 'ZZZ');

select * from a1;

select * from t1, a1 where t1.a = a1.bx;

