aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/window/win_func_aggr_stat.sql
blob: 7d7ed2bb52adcdfb811671af85ccdb10b95c25e3 (plain) (blame)
1
2
3
4
5
6
7
8
/* postgres can not */
select
    key, subkey,
    nanvl(correlation(cast(key as double), cast(subkey as double)) over w, NULL) as corr,
    nanvl(covariance(cast(key as double), cast(subkey as double)) over w, -9.9) as covar,
    hll(value, 18) over w as hll    
from plato.Input
window w as (order by subkey);