last date for each user sql

Solutions on MaxInterview for last date for each user sql by the best coders in the world

showing results for - "last date for each user sql"
Alessia
30 Jun 2019
1select t.username, t.date, t.value
2from MyTable t
3inner join (
4    select username, max(date) as MaxDate
5    from MyTable
6    group by username
7) tm on t.username = tm.username and t.date = tm.MaxDate
8
similar questions
queries leading to this page
last date for each user sql