get_stock_coverage โ Stock Coverage
For each item, how many days the current on-hand quantity lasts at the recent average daily sales rate.
This is a Named SQL Query (SAP
/SQLQueries) โ dynamic
aggregate SQL returning per-query rows, not a fixed Service Layer entity.Stock-coverage report โ for each item, how many days the current on-hand quantity lasts at
the recent average daily sales rate. Returns one row per item with on_hand (summed across
warehouses), avg_daily_demand (trailing-90-day sold quantity รท 90), and days_cover
(on_hand รท avg_daily_demand), highest run-out risk (lowest cover) first. Items with no recent
demand show days_cover 0 and sort last.
Try these prompts
- “stock coverage for all items”
- “which items are about to run out?”
- “days of stock cover for I001”
- “stock coverage for I001 as of 2025-12-31”
ื ืกื ืื ืืขืืจืืช
- “ืื ืืืกืื ืืืืื ืืื ืืคืจืืืื?”
- “ืืืื ืคืจืืืื ืขืืืืื ืืืืืืจ?”
- “ืืืื ืืื ืืืื ืืฉ ืืืกืื?”
Arguments
| Arg | Required | Meaning |
|---|---|---|
item_code | optional | One product, e.g. I001, or “all” for every item. Omit and Norma asks which item you mean. |
as_of_date | optional | YYYY-MM-DD โ the trailing 90-day demand window ends here. Omit for today. |
Example result
I002 runs out first. I002 โ 40 on hand, 8/day demand, 5 days cover. I001 โ 300 on hand, 6/day demand, 50 days cover.
Result columns
| Column | Type | Meaning |
|---|---|---|
item_code | text | The item’s SAP code. |
item_name | text | The item’s name. |
on_hand | number | Quantity on hand, summed across warehouses. |
avg_daily_demand | number | Trailing-90-day sold quantity, divided by 90. |
days_cover | number | How many days on_hand lasts at avg_daily_demand (0 when there is no recent demand). |
Charts
- bar: x=item_code, y=days_cover, title=“Days of stock cover”
- bar: x=item_code, y=on_hand,avg_daily_demand, title=“On hand vs daily demand”
Related
report_inventory_valuationโ the money value of that stock, not how long it lasts.get_order_backlogโ open-order demand against stock.