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

ArgRequiredMeaning
item_codeoptionalOne product, e.g. I001, or “all” for every item. Omit and Norma asks which item you mean.
as_of_dateoptionalYYYY-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

ColumnTypeMeaning
item_codetextThe item’s SAP code.
item_nametextThe item’s name.
on_handnumberQuantity on hand, summed across warehouses.
avg_daily_demandnumberTrailing-90-day sold quantity, divided by 90.
days_covernumberHow 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”
  • report_inventory_valuation โ€” the money value of that stock, not how long it lasts.
  • get_order_backlog โ€” open-order demand against stock.