aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/join/bush_dis_in.sql
blob: 82a9d54d6fc8eae270024107539566c5b1b37081 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
PRAGMA DisableSimpleColumns;
USE plato;
select * from (
    SELECT DISTINCT i1.key AS Key, i1.value as Value, i2.value as Join
    FROM Roots AS i1
    INNER JOIN Leaves AS i2 ON i1.leaf = i2.key
    UNION ALL
    SELECT DISTINCT i1.key AS Key, i1.value as Value, i2.value as Join
    FROM Roots AS i1
    INNER JOIN Branches AS i2 ON i1.branch = i2.key
) order by Key, Value, Join;