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

# Promotions

> Discounted order lines and their promotional revenue.

Discounted order lines and their promotional revenue.

## Example

```sql theme={null}
FROM promo
  SHOW discounted_units, total_units
  GROUP BY product
  ORDER BY discounted_units DESC
```

## Metrics

| Metric              | Type     | Description                                                                                      |
| ------------------- | -------- | ------------------------------------------------------------------------------------------------ |
| `discounted_units`  | Number   | Units sold at a discount in the period.                                                          |
| `total_units`       | Number   | Total units sold in the period.                                                                  |
| `discount_rate`     | Percent  | Share of units sold at a discount (discounted ÷ total units).                                    |
| `discount_amount`   | Currency | Money discounted in the period, including markdowns (where Shopify reporting data is available). |
| `discount_per_unit` | Currency | Average money discounted per unit sold in the period.                                            |

## Dimensions

| Dimension      | Description                                                       |
| -------------- | ----------------------------------------------------------------- |
| `product`      | Product with image, rendered as a single cell (variants roll up). |
| `vendor`       | Product vendor.                                                   |
| `product_type` | Shopify product type.                                             |

## Filters

| Filter                     | Type   | Description                                                                 |
| -------------------------- | ------ | --------------------------------------------------------------------------- |
| `collection`               | Number | Restrict to products in the selected collection(s).                         |
| `category`                 | Text   | Restrict to products in the selected category (matches sub-categories too). |
| `sales_channel`            | Number | Restrict to products published to the selected sales channel.               |
| `region_catalog`           | Number | Restrict to products in the selected region (market) catalog.               |
| `b2b_catalog`              | Number | Restrict to products in the selected B2B (market) catalog.                  |
| `company_location_catalog` | Number | Restrict to products in the selected company-location catalog.              |
| `vendor`                   | Text   | Product vendor.                                                             |
| `product_type`             | Text   | Shopify product type.                                                       |
| `sku`                      | Text   | Variant SKU.                                                                |

## Related datasets

* [Sales](/stockfulql/datasets/sales)
* [Sales trends](/stockfulql/datasets/sales_history)
* [Returns](/stockfulql/datasets/returns)
