#794

After a migration there are duplicates — keep the freshest

After a migration users ended up with duplicates: several rows per email. Keep only the freshest user (the one with the latest creation date), drop the rest. Hint: if you number rows within each email by descending creation date, the freshest row gets number one and the rest get larger numbers — those are the ones to delete.

Expected output sample

This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables.

nameemail
Alice newa@example.com
Bobb@example.com
Carol3c@example.com

Your query result will appear here