Weekly Aggregation and Filtering

Aggregate the table with time range filtering, with weekly groupings.

Description

This example shows how to apply weekly aggregation and filtering. The queries below are applying the aggregate functions, to the last 10 weeks worth of data.

Sample Input

tbl
time col
1416435585 2
1416435586 3
1416435587 5
1416435588 1
... ...

Query


to view this query

Sample Output

day cnt sum
2014-10-05 31 136
2014-10-12 41 231
2014-10-19 91 931
2014-10-26 21 833