aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/blocks/distinct_mixed_keys.sql
blob: 8c3aac0c0b4b54df1c7c751f0121817f74a8bdd4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
pragma yt.UsePartitionsByKeysForFinalAgg="false";

USE plato;

SELECT
    key, count(*), count(distinct subkey), sum(distinct subkey), 
    count(distinct Unwrap(subkey/2u)), sum(distinct Unwrap(subkey/2u))
FROM Input
GROUP BY key
ORDER BY key