You missed part of the point: The data sought is the top thirty customers by total, where each customer has multiple transactions. There's no way to know that the last transaction in the file, plus something you've already discarded as inadequate, isn't enough to put a customer back in the top 30.
The previous suggestions of sorting address this neatly. I was hoping to have something clever to add, but as usual the more prompt monks have covered this one thoroughly.
-- Spring: Forces, Coiled Again!
| [reply] |