I have been trying to find a way to do this but I can't seem to figure out how. The following table is the one I am trying to "clean up".
-------------
| Messages |
-------------
| ID |
| user_id |
| msg |
| timestamp |
-------------
Basically I want to remove all messages except for the latest 10 per user_id
.
I really have no idea how to go about this.
Any suggestions would be useful.