I have a table saving scores for a game that have 3 columns (more in practice, but it is easier for everyone this way):
userid : the id of the user that got the score timestamp: the time the score was gotten score : the score itself
The goal of the query is to delete rows so we have at most 10 scores per user.We also want to keep the most recent rows. So we need to delete the older ones until we get to 10.Note that some players may have less than 10 scores.
How would I manage to do this?