I have seen this issue in SF, but me being a noob I just can\'t get my fried brain around them. So please forgive me if this feels like repetition.
My Sample Table>
SELECT x.* FROM supplier_stock x JOIN supplier_stock y ON y.supplier = x.supplier AND y.id >= x.id GROUP BY supplier , id HAVING SUM(y.qty) <=5;