Stock on hand stock_on_hand
Units in the warehouses. The canonical answer is what can be sold (on hand minus reserved for open orders); the physical count is the other definition.
Parameters: none
available · v1 · head of fulfilment
On hand minus reserved, per product and warehouse, where positive.
SELECT product_id, warehouse_id, on_hand - reserved AS units FROM stock_levels WHERE on_hand - reserved > 0
physical · v1 · head of fulfilment
The physical count on the shelves, per product and warehouse.
SELECT product_id, warehouse_id, on_hand AS units FROM stock_levels WHERE on_hand > 0