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

# FROM and SHOW

> Pick the dataset and list the metrics your report displays

Every query begins with `FROM` and `SHOW`. `FROM` names the dataset the report reads from, such as `sales`, `inventory`, or `returns`. `SHOW` lists the metrics you want to see, separated by commas.

```sql theme={null}
FROM sales
  SHOW total_revenue, units_sold
```

## Combining datasets

You can combine two datasets with `+` when you want metrics from both in one report, for example sales alongside current stock. The first dataset sets the grain and the second is joined onto it.

```sql theme={null}
FROM sales + inventory
  SHOW total_revenue, inventory_value
```

Rows are matched on the shared variant and location grain and outer-joined, so a row present in only one dataset is kept with the other side's metrics zero-filled. See [Units sold next to stock on hand](/stockfulql/examples#units-sold-next-to-stock-on-hand-by-vendor) for a worked example.

## Renaming a column

Add `AS "Label"` after a metric to give its column a custom heading. The label is shown wherever the column appears, including exports.

```sql theme={null}
FROM sales
  SHOW total_revenue AS "Revenue", units_sold AS "Units"
```

## Computed columns

`SHOW` also accepts computed columns built from metrics and numbers using `+`, `-`, `*`, and `/`. Multiplication and division bind tighter than addition and subtraction, and parentheses group. Division guards against divide-by-zero. Computed columns follow the plain metrics and usually carry an `AS` label.

```sql theme={null}
FROM sales
  SHOW total_revenue, units_sold, total_revenue / units_sold AS "Avg unit price"
```

Which metrics are available depends on the dataset you chose. See [WHERE](/stockfulql/syntax/where) to narrow the rows and [GROUP BY](/stockfulql/syntax/group-by) to break the results down by dimension.
