aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/join/join_and_distinct_key.sql
blob: 08037b8f7d58fbeadcb96d535332bdc5205c9a58 (plain) (blame)
1
2
3
4
5
6
7
PRAGMA DisableSimpleColumns;
/* postgres can not */
SELECT
    count(i1.key) as count,
    count(distinct i1.key) as uniq_count
FROM plato.Input as i1 JOIN plato.Input AS i2 on cast(i1.key as uint32) / 100 == cast(i2.subkey as uint32) / 100
;