Docs

TIMESERIES

Last updated: 27 Oct 2026

TIMESERIES returns one row for every period in the range, including periods with no data, which show 0. Use it for charts over time, where a missing month would draw a wrong line.

TIMESERIES <day | week | month | quarter | year | day_of_week | week_of_year | month_of_year>

GROUP BY month and TIMESERIES month both give a row per month. The difference is the empty months: GROUP BY leaves them out and TIMESERIES keeps them as 0. Rows come oldest first, and the chart is a line.

Occupancy week by week

FROM rooms
  SHOW occupancy
  DURING this_quarter
  TIMESERIES week

One line per room type

With GROUP BY, every period appears for every group.

FROM rooms
  SHOW occupancy
  DURING this_quarter
  GROUP BY room_type
  TIMESERIES week

Twelve months of revenue

FROM revenue
  SHOW net_revenue, total_revenue
  SINCE startOfMonth(-11m)
  TIMESERIES month

Bookings by weekday

day_of_week, week_of_year and month_of_year work too, with a row for each weekday, week number or month in the range. Their chart is a bar chart.

FROM bookings
  SHOW bookings
  DURING last_year
  TIMESERIES day_of_week