Viewing post 1 (of 1 total)
WITH CTE AS
(SELECT *, row_number() over (partition by unit order by id desc) as rowno
from tablename
)
select * from CTE where rowno=1;
July 16, 2012 at 3:42 am
#1512975