I want to delete all rows older than 30 days, but keep the newest 3 rows.
All rows newer than 30 days should stay.
Purpose: I have a db with messages. All messages older than 30 days should auto-delete (cron), but I want 3 messages to stay, so that users always know what the convo was about in case there are no messages newer than 30 days.
Deleting all rows older than 30 days is no problem, but I can't figure out how to exempt the 3 messages.