Let's say I have this table.
users|amount
------------
User1| 500
User1| 400
User1| 300
User1| 200
User1| 100
User2| 500
User2| 400
User2| 300
User2| 200
User3| 300
User3| 200
I want to display at most 3 transaction for each user. The result given in the example should be this.
users|amount
------------
User1| 500
User1| 400
User1| 300
User2| 500
User2| 400
User2| 300
User3| 300
User3| 200
Is there a way to do this in SQL (MySQL)? What steps should I do?