aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/udfs/common/histogram/test/cases/Basic.sql
blob: 2e080bd2ba78f0f3218c4b07a62909e3c55d74e6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
/* syntax version 1 */
SELECT
    HISTOGRAM(key) AS key_histogram,
    HISTOGRAM(subkey) AS subkey_histogram,
    HISTOGRAM(value) AS value_histogram
FROM (
    SELECT
        CAST(key AS Double) AS key,
        CAST(subkey AS Double) AS subkey,
        CAST(value AS Double) AS value
    FROM Input
);