Multiple max values in a query

前端 未结 6 1901
余生分开走
余生分开走 2021-01-12 21:08

I know the title does not sound very descriptive, but it is the best I could think of:

I have this table

ID     BDATE      VALUE
28911  14/4/2009  44820
2         


        
6条回答
  •  清酒与你
    2021-01-12 21:30

    select a.* from myview a, (select id, max(bdate) from myview group by id) b
    where a.id = b.id and a.bdate = b.bdate
    

提交回复
热议问题