Samples
Time bucketing with aggregates
Bucket temperature readings into 5-minute intervals and calculate statistics:Gapfilling missing data
Fill gaps in time-series data using last observation carried forward (LOCF):Analyzing data distribution
Create a histogram of response times to understand distribution patterns:Approximate row counting
Get a fast estimate of table size without scanning all data:Available function groups
Time series utilities
Core functions for time bucketing, ordered selection, and time-based calculations:time_bucket(): bucket rows by time intervaltime_bucket_ng(): next generation time bucketing with additional featuresfirst(): get the first value ordered by another columnlast(): get the last value ordered by another columndays_in_month(): calculate days in a monthmonth_normalize(): normalize monthly metrics
Gapfilling
Functions for filling gaps in time-series data:time_bucket_gapfill(): bucket time and fill gaps in resultslocf(): last observation carried forward for filling gapsinterpolate(): linear interpolation for filling gaps
Distribution analysis
Functions for analyzing data distribution patterns:histogram(): create histograms to visualize data distributionapproximate_row_count(): fast approximate count of rows in a table