aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/join/group_compact_by.sql
blob: d5f33612dfd01857af8bc17046bfc9d643e43ba1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
USE plato;

PRAGMA yt.JoinMergeForce = "1";
pragma yt.JoinMergeTablesLimit="10";

SELECT key1, subkey1
FROM
    (
        SELECT a.key as key1, a.subkey as subkey1
        FROM (SELECT * FROM Input WHERE subkey != "bar") AS a
        JOIN (SELECT * FROM Input WHERE subkey != "foo") AS b
        ON a.key = b.key AND a.subkey = b.subkey
    )
GROUP COMPACT BY key1, subkey1;