> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stockful.app/llms.txt
> Use this file to discover all available pages before exploring further.

# TIMESERIES

> Bucket the results into time periods over the date range

`TIMESERIES` breaks your results into time buckets across the date range, so you can see how a metric moves over time. Choose one grain: `day`, `week`, or `month`.

```sql theme={null}
FROM sales
  SHOW total_revenue
  TIMESERIES week
  DURING last_quarter
```

Each bucket in the range gets a row, including quiet periods with no activity, so a line or bar chart reads as a continuous trend. Pair it with a date clause to set the window, such as [DURING](/stockfulql/syntax/since-until-during) above.

A timeseries is a single trend across your whole shop, so it cannot be combined with [GROUP BY](/stockfulql/syntax/group-by). To plot the trend as a chart, add [VISUALIZE](/stockfulql/syntax/visualize) with a `line` or `bar` type, and to overlay events like restocks or stockouts use [ANNOTATE](/stockfulql/syntax/annotate).
