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

# WITH

> Add result modifiers like totals, subtotals, percent change, and running totals

`WITH` adds extra rows or columns to the results without changing what the report measures. List one or more modifiers, separated by commas.

```sql theme={null}
FROM sales
  SHOW total_revenue, units_sold
  GROUP BY vendor
  WITH TOTALS
```

## Modifiers

| Modifier            | What it adds                                          |
| ------------------- | ----------------------------------------------------- |
| `TOTALS`            | An ungrouped total row across all results             |
| `GROUP_TOTALS`      | A subtotal row per first group, for a nested table    |
| `PERCENT_CHANGE`    | Percent-change columns versus the comparison period   |
| `CUMULATIVE_VALUES` | Running-total columns accumulated over the sort order |

`PERCENT_CHANGE` needs a comparison period, so pair it with [COMPARE TO](/stockfulql/syntax/compare-to). `CUMULATIVE_VALUES` accumulates in the report's sort order, so it works best alongside [ORDER BY](/stockfulql/syntax/order-by) or a [TIMESERIES](/stockfulql/syntax/timeseries).

```sql theme={null}
FROM sales
  SHOW total_revenue
  DURING this_month
  COMPARE TO previous_period
  WITH PERCENT_CHANGE
```
