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

# WITH

> Add totals, subtotals, percent change, running totals, or show money in another currency.

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

```sql theme={null}
FROM sales
  SHOW net_sales, orders
  GROUP BY product_vendor
  WITH TOTALS
```

| Modifier | Adds |
| - | - |
| `TOTALS` | A total row across every result |
| `GROUP_TOTALS` | A subtotal for each value of the first dimension |
| `PERCENT_CHANGE` | A percent change column for each metric, against the [comparison](https://docs.queryful.app/queryfulql/syntax/compare-to.md) |
| `CUMULATIVE_VALUES` | A running total for each metric, over time |
| `CURRENCY 'EUR'` | Money in another currency, converted at each day's rate |

## Percent change

`PERCENT_CHANGE` compares each metric with the period in `COMPARE TO`:

```sql theme={null}
FROM sales
  SHOW net_sales, orders
  GROUP BY sales_channel
  DURING last_month
  COMPARE TO previous_period
  WITH PERCENT_CHANGE
```

Only metrics that add up over a period, like sales or orders, have a percent change. A balance on a given day, like stock on hand, doesn't.

## Running totals

`CUMULATIVE_VALUES` adds each period to the ones before it, so it needs the results split over time:

```sql theme={null}
FROM sales
  SHOW net_sales
  TIMESERIES day
  DURING this_month
  WITH CUMULATIVE_VALUES
```

## Another currency

`CURRENCY` takes a three-letter currency code in single quotes. Each day's amounts are converted at that day's exchange rate, the same as choosing a currency on the [report page](https://docs.queryful.app/user-guide/reports/report-page.md#currency).

```sql theme={null}
FROM sales
  SHOW net_sales, total_sales
  GROUP BY customer_country
  DURING last_month
  WITH CURRENCY 'USD'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.