aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/aggregate/group_by_hop_compact.sql
blob: a85dfcf6b5943ab478e9811dfca339b572298018 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* syntax version 1 */
/* postgres can not */
/* ytfile can not */
/* yt can not */

PRAGMA dq.AnalyticsHopping="true";

SELECT
    user,
    HOP_START() as ts,
    SUM(payload) as payload
FROM plato.Input
GROUP COMPACT BY HOP(DateTime::FromSeconds(CAST(ts as Uint32)), "PT10S", "PT10S", "PT10S"), user;