TIME_BUCKET
Bucket date into fixed-width intervals.
Category: Date & Time Functions
Syntax
TIME_BUCKET(magnitude, units, date)
Arguments
- magnitude
numberBucket width for each interval. - units
varchar[constant] Unit for the bucket width, such asminute,hour, orday. Must be a constant expression. - date
temporalDate, time, or timestamp value to evaluate.
Returns
timestamp — Returns the computed result as timestamp.