2023-02-19 20:36:59 +00:00
|
|
|
SET allow_experimental_analyzer = 1;
|
|
|
|
|
2019-02-11 19:14:57 +00:00
|
|
|
select s.a as a, s.a + 1 as b from (select 10 as a) s;
|
|
|
|
select s.a + 1 as a, s.a as b from (select 10 as a) s;
|
|
|
|
select s.a + 1 as a, s.a + 1 as b from (select 10 as a) s;
|
|
|
|
select s.a + 1 as b, s.a + 2 as a from (select 10 as a) s;
|
|
|
|
select s.a + 2 as b, s.a + 1 as a from (select 10 as a) s;
|
2019-02-11 19:33:04 +00:00
|
|
|
|
2019-04-05 14:29:15 +00:00
|
|
|
select a, a as a from (select 10 as a);
|
2023-02-19 20:36:59 +00:00
|
|
|
select s.a, a, a + 1 as a from (select 10 as a) as s;
|
2019-04-05 14:29:15 +00:00
|
|
|
select s.a + 2 as b, b - 1 as a from (select 10 as a) s;
|
|
|
|
select s.a as a, s.a + 2 as b from (select 10 as a) s;
|
|
|
|
select s.a + 1 as a, s.a + 2 as b from (select 10 as a) s;
|
|
|
|
select a + 1 as a, a + 1 as b from (select 10 as a);
|
|
|
|
select a + 1 as b, b + 1 as a from (select 10 as a); -- { serverError 174 }
|
2023-02-19 20:36:59 +00:00
|
|
|
select 10 as a, a + 1 as a; -- { serverError 47 }
|
|
|
|
with 10 as a select a as a; -- { serverError 47 }
|
|
|
|
with 10 as a select a + 1 as a; -- { serverError 47 }
|
2019-04-05 14:29:15 +00:00
|
|
|
|
2019-02-11 19:33:04 +00:00
|
|
|
SELECT 0 as t FROM (SELECT 1 as t) as inn WHERE inn.t = 1;
|
|
|
|
SELECT sum(value) as value FROM (SELECT 1 as value) as data WHERE data.value > 0;
|
2019-02-11 19:39:11 +00:00
|
|
|
|
2019-06-03 17:36:27 +00:00
|
|
|
DROP TABLE IF EXISTS test_00818;
|
|
|
|
CREATE TABLE test_00818 (field String, not_field String) ENGINE = Memory;
|
2020-12-04 02:15:44 +00:00
|
|
|
INSERT INTO test_00818 (field, not_field) VALUES ('123', '456');
|
2019-06-03 17:36:27 +00:00
|
|
|
SELECT test_00818.field AS other_field, test_00818.not_field AS field FROM test_00818;
|
|
|
|
DROP TABLE test_00818;
|