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

# Overview

> The data you can query with StockfulQL, grouped by area

A query always starts with a dataset in its `FROM` clause. Each dataset covers one area of your store and groups the metrics and dimensions that belong together, so a query only uses the fields its dataset defines.

**Metrics** are the numbers a dataset lets you measure, like `inventory_value` or `total_revenue`. You return them with `SHOW`.

**Dimensions** are the attributes you break those metrics down by, like `vendor`, `product` or `reason`. Group by them with `GROUP BY`, bucket them over time with `TIMESERIES`, or filter on them with `WHERE`.

Each dataset's page below lists its metrics and dimensions with a type and description, plus the filters it supports. Pick the one that holds the data you want.

<div style={{ border: "1px solid rgba(128,128,128,0.25)", borderRadius: "14px", padding: "20px", maxWidth: "460px" }}>
  <div style={{ display: "flex", alignItems: "center", gap: "10px", marginBottom: "14px" }}><span style={{ fontFamily: "monospace", fontSize: "22px", fontWeight: 700 }}>inventory</span><span style={{ fontSize: "11px", letterSpacing: "0.6px", padding: "2px 8px", borderRadius: "999px", background: "rgba(128,128,128,0.15)", color: "#8b8b8b" }}>DATASET</span></div>
  <div style={{ color: "#2f9e6b", fontWeight: 700 }}>Metrics</div>
  <div style={{ fontSize: "13px", color: "#8b8b8b", margin: "2px 0 10px" }}>Values you measure</div>
  <div style={{ display: "flex", flexWrap: "wrap", gap: "8px", marginBottom: "18px" }}><span style={{ fontFamily: "monospace", fontSize: "13px", padding: "4px 10px", borderRadius: "8px", background: "rgba(47,158,107,0.13)", color: "#2f9e6b", whiteSpace: "nowrap" }}>inventory\_value</span><span style={{ fontFamily: "monospace", fontSize: "13px", padding: "4px 10px", borderRadius: "8px", background: "rgba(47,158,107,0.13)", color: "#2f9e6b", whiteSpace: "nowrap" }}>days\_of\_supply</span><span style={{ fontFamily: "monospace", fontSize: "13px", padding: "4px 10px", borderRadius: "8px", background: "rgba(47,158,107,0.13)", color: "#2f9e6b", whiteSpace: "nowrap" }}>days\_out\_of\_stock</span></div>
  <div style={{ color: "#7a6ff0", fontWeight: 700 }}>Dimensions</div>
  <div style={{ fontSize: "13px", color: "#8b8b8b", margin: "2px 0 10px" }}>Break metrics down by</div>
  <div style={{ display: "flex", flexWrap: "wrap", gap: "8px" }}><span style={{ fontFamily: "monospace", fontSize: "13px", padding: "4px 10px", borderRadius: "8px", background: "rgba(122,111,240,0.15)", color: "#7a6ff0", whiteSpace: "nowrap" }}>product</span><span style={{ fontFamily: "monospace", fontSize: "13px", padding: "4px 10px", borderRadius: "8px", background: "rgba(122,111,240,0.15)", color: "#7a6ff0", whiteSpace: "nowrap" }}>vendor</span><span style={{ fontFamily: "monospace", fontSize: "13px", padding: "4px 10px", borderRadius: "8px", background: "rgba(122,111,240,0.15)", color: "#7a6ff0", whiteSpace: "nowrap" }}>sku</span></div>
</div>

## Inventory

| Dataset                                     | What it holds                                                                                  |
| ------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| [Inventory](/stockfulql/datasets/inventory) | Stock levels, valuation and cover per variant and location, live and over any past date range. |

## Sales

| Dataset                                            | What it holds                                                                                                                |
| -------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| [Sales](/stockfulql/datasets/sales)                | Fulfilled order lines: units, revenue and margin over a date range.                                                          |
| [Sales trends](/stockfulql/datasets/sales_history) | Long-horizon daily sales - units, revenue and discounts per variant over up to two years, for trends and year-over-year.     |
| [Returns](/stockfulql/datasets/returns)            | Product returns from order refunds: units returned, return rate and net-of-returns sales by product, SKU, vendor and reason. |
| [Promotions](/stockfulql/datasets/promo)           | Discounted order lines and their promotional revenue.                                                                        |

## Purchasing

| Dataset                                                           | What it holds                                                                                                                                           |
| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Purchasing](/stockfulql/datasets/purchasing)                     | Purchase order lines: spend, units ordered and received, supplier and landed cost. Placed orders only.                                                  |
| [Purchase costs](/stockfulql/datasets/purchase_costs)             | Freight, duty and fees added to purchase orders, and what they add on top of the goods.                                                                 |
| [Cost history](/stockfulql/datasets/cost_history)                 | Every recorded change to a variant's cost - purchase-order receipts and edits made in Shopify.                                                          |
| [Goods receipts](/stockfulql/datasets/receipts)                   | Goods receipts: when each delivery landed and how long the supplier took.                                                                               |
| [Supplier performance](/stockfulql/datasets/supplier_performance) | Purchase-order delivery reliability by supplier: on-time rate, deliveries and average days late, judged on the first receipt against the expected date. |

## Replenishment

| Dataset                                                              | What it holds                                                                                   |
| -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| [Reorder history](/stockfulql/datasets/reorder_history)              | One row per SKU per night it was on the reorder list - what was recommended, and when.          |
| [Reorder (all locations)](/stockfulql/datasets/reorder_consolidated) | The reorder list with locations pooled: one decision per variant for the whole business.        |
| [Transfer history](/stockfulql/datasets/transfer_history)            | One row per location pair per night it was on the transfer list - what was suggested, and when. |
| [Transfer suggestions](/stockfulql/datasets/transfer_suggestions)    | The live rebalance list: stock worth moving between locations right now, and how much.          |

## Operations

| Dataset                                                 | What it holds                                                                 |
| ------------------------------------------------------- | ----------------------------------------------------------------------------- |
| [Stock adjustments](/stockfulql/datasets/adjustments)   | Performed stock adjustments: net change, cost impact and shrinkage by reason. |
| [Pricing](/stockfulql/datasets/price_history)           | Recorded price changes per variant over time.                                 |
| [Forecast accuracy](/stockfulql/datasets/forecast_runs) | Forecast accuracy: predicted vs actual demand per run.                        |
