aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/aggregate/group_by_hop_distinct.sql
blob: d9aed1fac9ae80acd72b40daac0241df3a670602 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* Test is broken for now */

/* syntax version 1 */
/* postgres can not */
/* ytfile can not */
/* yt can not */
/* dq can not */
/* dqfile can not */

PRAGMA dq.AnalyticsHopping="true";

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