Update
I found out that my approach with groupBy does not work if MySQL is running with strict => true in the config/database.php
So it's all about the strict model of MySql. I'm not in favor of turning it off just for the sake of having my approach works.
The problem however, is that the dataset I have is huge! It'll be impractical to use chunk() on the collection retrieved.
I need a mechanism to chunk the results by user_id so that I can process all the rows for each of the user.
Is that even possible?