Samples
Time bucketing
Bucket temperature readings into 5-minute intervals and calculate the average:Ordered selection
Get the first and last temperature values for each device in 1-hour buckets:Month normalization
Normalize monthly sales metrics to account for varying month lengths:Available functions
Time bucketing
time_bucket(): bucket rows by time interval to calculate aggregatestime_bucket_ng(): next generation time bucketing with additional features
Ordered selection
first(): get the first value in one column when rows are ordered by another columnlast(): get the last value in one column when rows are ordered by another column
Time utilities
days_in_month(): calculate the number of days in a month given a timestampmonth_normalize(): normalize a monthly metric based on the number of days in the month