aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/join/left_only_with_other.sql
blob: 65b1bf178d021844814d7027da83ee5f8fae6265 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
PRAGMA DisableSimpleColumns;
/* postgres can not */
USE plato;

$data1 = (select cast(key as uint32) as key, subkey, value from Input1);
$data2 = (select cast(key as uint32) % 100u as key, subkey, value from Input1);

--INSERT INTO Output
SELECT
    i1.*
FROM $data1 as i1
LEFT ONLY JOIN $data2 as i2 ON i1.key = i2.key
JOIN $data1 as i3 ON i1.key = i3.key
;