Slick: self inner join


#1

Refer:

How can I do this in Slick’s DSL? I want the solution to be efficient.

select t.username, t.date, t.value
from MyTable t
inner join (
select username, max(date) as MaxDate
from MyTable
group by username
) tm on t.username = tm.username and t.date = tm.MaxDate