diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-11 16:35:00 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-11 16:35:00 +0000 |
commit | 862ffe93f7f5530e12816e57fbb77d58932c10ad (patch) | |
tree | 1f770c52c83988eb1b528dad0521d93924056e78 /tests/fixtures/optimizer/qualify_columns.sql | |
parent | Releasing debian version 24.1.0-1. (diff) | |
download | sqlglot-862ffe93f7f5530e12816e57fbb77d58932c10ad.tar.xz sqlglot-862ffe93f7f5530e12816e57fbb77d58932c10ad.zip |
Merging upstream version 25.0.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/fixtures/optimizer/qualify_columns.sql')
-rw-r--r-- | tests/fixtures/optimizer/qualify_columns.sql | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/fixtures/optimizer/qualify_columns.sql b/tests/fixtures/optimizer/qualify_columns.sql index 1092bc8..ea96fe5 100644 --- a/tests/fixtures/optimizer/qualify_columns.sql +++ b/tests/fixtures/optimizer/qualify_columns.sql @@ -131,6 +131,10 @@ SELECT DATE(x.a) AS _col_0, DATE(x.b) AS c FROM x AS x GROUP BY DATE(x.a), DATE( SELECT (SELECT MIN(a) FROM UNNEST([1, 2])) AS f FROM x GROUP BY 1; SELECT (SELECT MIN(_q_0.a) AS _col_0 FROM UNNEST(ARRAY(1, 2)) AS _q_0) AS f FROM x AS x GROUP BY 1; +# dialect: bigquery +WITH x AS (select 'a' as a, 1 as b) SELECT x.a AS c, y.a as d, SUM(x.b) AS y, FROM x join x as y on x.a = y.a group by 1, 2; +WITH x AS (SELECT 'a' AS a, 1 AS b) SELECT x.a AS c, y.a AS d, SUM(x.b) AS y FROM x AS x JOIN x AS y ON x.a = y.a GROUP BY x.a, 2; + SELECT SUM(x.a) AS c FROM x JOIN y ON x.b = y.b GROUP BY c; SELECT SUM(x.a) AS c FROM x AS x JOIN y AS y ON x.b = y.b GROUP BY y.c; |