> ## 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.

# SINCE, UNTIL and DURING

> Set the date range your report covers

Every report runs over a date range. StockfulQL sets that range in one of two ways: a named range with `DURING`, or an explicit start and end with `SINCE` and `UNTIL`. Leave the date clause out entirely to read all of your history.

## DURING

`DURING` picks a named calendar range. It is the quickest way to cover a whole period.

```sql theme={null}
FROM sales
  SHOW total_revenue
  DURING last_month
```

Named ranges include `today`, `yesterday`, `this_week`, `last_week`, `this_month`, `last_month`, `this_quarter`, `last_quarter`, `this_year`, and `last_year`.

## SINCE and UNTIL

`SINCE` sets the start of the range and `UNTIL` sets the end. Both take an operand that resolves to a date.

```sql theme={null}
FROM sales
  SHOW total_revenue
  SINCE -30d UNTIL today
```

Operands can be:

| Operand               | Meaning                                                     |
| --------------------- | ----------------------------------------------------------- |
| `2026-01-01`          | An exact ISO date                                           |
| `today` / `yesterday` | The current day, or the day before                          |
| `-30d`, `-12m`        | A relative offset back from today (`d`, `w`, `m`, `q`, `y`) |
| `startOfDay(-90d)`    | The start of a period N units ago                           |
| `endOfMonth(-1m)`     | The end of a period N units ago                             |

The period functions come in `startOf...` and `endOf...` forms over `Day`, `Week`, `Month`, `Quarter`, and `Year`. For example, `SINCE startOfDay(-90d) UNTIL today` covers the last ninety days.

```sql theme={null}
FROM inventory
  SHOW inventory_value
  SINCE startOfMonth(-1m) UNTIL endOfMonth(-1m)
```

To compare the range against an earlier one, add [COMPARE TO](/stockfulql/syntax/compare-to). To break the range into buckets over time, add [TIMESERIES](/stockfulql/syntax/timeseries).
