while select sum(PhysicalInvent) from inventSum
join inventDim
group by InventLocationId
where inventSum.InventDimId == inventDim.inventDimId //// you may need an ItemId predicate along as the stock is viewed per item
{
print inventSum.PhysicalInvent;
}
join inventDim
group by InventLocationId
where inventSum.InventDimId == inventDim.inventDimId //// you may need an ItemId predicate along as the stock is viewed per item
{
print inventSum.PhysicalInvent;
}