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

# Reorder history

> One row per SKU per night it was on the reorder list - what was recommended, and when.

One row per SKU per night it was on the reorder list - what was recommended, and when.

## Example

```sql theme={null}
FROM reorder_history
  SHOW units_to_order, recommended_spend
  GROUP BY product
  ORDER BY units_to_order DESC
```

## Metrics

| Metric                        | Type          | Description                                                                                                                      |
| ----------------------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `units_to_order`              | Number        | Recommended order quantity on the most recent day in the range, after netting off incoming stock.                                |
| `recommended_spend`           | Currency      | Cost of the recommended order on the most recent day in the range.                                                               |
| `skus_to_order`               | Number        | Number of variants recommended on the most recent day in the range.                                                              |
| `units_on_hand`               | Number        | Stock held by the flagged SKUs on the most recent day. Covers recommended rows only - it will not match total inventory.         |
| `units_incoming`              | Number        | Inbound stock against the flagged SKUs on the most recent day.                                                                   |
| `avg_days_of_supply`          | Number        | Mean cover across the flagged SKUs on the most recent day.                                                                       |
| `avg_daily_velocity`          | Units per day | Mean daily sales rate across the flagged SKUs on the most recent day.                                                            |
| `as_of_date`                  | Date          | The most recent day in the range that has logged recommendations.                                                                |
| `sku_days_flagged`            | Number        | Days spent on the reorder list, summed across SKUs - a variant flagged for 3 days counts 3.                                      |
| `skus_flagged`                | Number        | Distinct variants that appeared on the reorder list at any point in the range.                                                   |
| `times_flagged`               | Number        | Separate spells on the reorder list - consecutive days count once, so a SKU flagged, restocked, then flagged again counts twice. |
| `sku_days_snoozed`            | Number        | Of the days flagged, how many the recommendation was snoozed on.                                                                 |
| `avg_daily_units_to_order`    | Number        | Recommended order quantity averaged over the days in the range. Safe to chart.                                                   |
| `avg_daily_recommended_spend` | Currency      | Recommended order cost averaged over the days in the range. Safe to chart.                                                       |
| `first_flagged_date`          | Date          | Earliest day in the range the SKU appeared on the reorder list.                                                                  |
| `last_flagged_date`           | Date          | Most recent day in the range the SKU appeared on the reorder list.                                                               |

## Dimensions

| Dimension        | Description                                                                                                                                                                                 |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `product`        | Product with image, rendered as a single cell (variants roll up).                                                                                                                           |
| `sku`            | Variant SKU - splits a product-grain report into variant rows.                                                                                                                              |
| `variant`        | Variant title (e.g. "Small / Blue"), shown as a dash for products without options. Group by product too - on its own, variants sharing a title across different products fall into one row. |
| `location`       | The location the recommendation was made for.                                                                                                                                               |
| `vendor`         | Product vendor, grouping under a blank value when unset.                                                                                                                                    |
| `product_type`   | Product type, grouping under a blank value when unset.                                                                                                                                      |
| `forecast_model` | The demand model that produced the recommendation (linear, trend, day-of-week, seasonal, intermittent).                                                                                     |
| `snapshot_date`  | The day the recommendation was live.                                                                                                                                                        |

## 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.              |
| `product_title`            | Text   | Product title.                                                              |
| `sku`                      | Text   | Variant SKU.                                                                |
| `vendor`                   | Text   | Product vendor.                                                             |
| `product_type`             | Text   | Product type.                                                               |
| `location_name`            | Text   | Location name.                                                              |
| `forecast_model`           | Text   | The demand model behind the recommendation.                                 |
| `snoozed`                  | Text   | Whether the recommendation was snoozed on that day.                         |
| `quantity_to_order`        | Number | Recommended order quantity on that day.                                     |
| `days_of_supply`           | Number | Cover remaining on that day.                                                |

## Related datasets

* [Transfer history](/stockfulql/datasets/transfer_history)
* [Transfer suggestions](/stockfulql/datasets/transfer_suggestions)
* [Reorder (all locations)](/stockfulql/datasets/reorder_consolidated)
