dbms: JOINs: test for aliases [#METR-11370].

This commit is contained in:
Alexey Milovidov 2014-07-03 00:26:34 +04:00
parent 1579017cfd
commit 4ab04c8b06
2 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,10 @@
0 0 0 Hello
1 0.5 0 Hello
2 1 3 Hello
3 1.5 0 Hello
4 2 6 Hello
5 2.5 0 Hello
6 3 9 Hello
7 3.5 0 Hello
8 4 0 Hello
9 4.5 0 Hello

View File

@ -0,0 +1 @@
SELECT number, number / 2 AS n, j1, j2 FROM system.numbers ANY LEFT JOIN (SELECT number / 3 AS n, number AS j1, 'Hello' AS j2 FROM system.numbers LIMIT 10) USING n LIMIT 10