Pills remaining over pills dispensed query in flat tables