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

# Production

> Production batches: what each set out to make, what it actually made, and the material it took to do it.

Production batches: what each set out to make, what it actually made, and the material it took to do it.

## Example

```sql theme={null}
FROM production
  SHOW batches, planned_qty
  GROUP BY batch
  ORDER BY batches DESC
```

## Metrics

| Metric           | Type     | Description                                                           |
| ---------------- | -------- | --------------------------------------------------------------------- |
| `batches`        | Number   | How many production runs the group covers.                            |
| `planned_qty`    | Number   | Units the batches set out to make.                                    |
| `actual_qty`     | Number   | Units the batches actually produced. Blank until a batch closes.      |
| `yield_variance` | Number   | Made less planned. Negative means the batch fell short of its recipe. |
| `yield_rate`     | Percent  | Made as a share of planned.                                           |
| `material_used`  | Number   | Units of material the batches drew, in each material's own unit.      |
| `material_cost`  | Currency | What the material the batches consumed cost.                          |

## Dimensions

| Dimension           | Description                                                         |
| ------------------- | ------------------------------------------------------------------- |
| `batch`             | One production run, by its document number.                         |
| `status`            | Where the batch got to: underway, completed or cancelled.           |
| `material`          | A material the batch consumed - one row per material on the recipe. |
| `material_category` | The grouping on the consumed material's product.                    |
| `location`          | Where the batch was made.                                           |

## Filters

| Filter              | Type | Description                                      |
| ------------------- | ---- | ------------------------------------------------ |
| `status`            | Text | Where the batch got to.                          |
| `material_name`     | Text | A material the batch consumed.                   |
| `material_category` | Text | The grouping on the consumed material's product. |

## Related datasets

* [Raw materials](/stockfulql/datasets/materials)
* [Material movements](/stockfulql/datasets/material_movements)
