select * from 表 where id in(select id from (select max(id) id,max(App_level) App_level  from 表 group by table_id) as A)

解决方案 »

  1.   

    select max(id) as id,table_id,App_type,max(App_level) as App_level,App_status  from table
    group by table_id,App_type,App_status
      

  2.   

    没测试过,不知道行不行
    select * from tablename 
    where id in
    (select id,max(App_level) as app_level ) from tablename group by table_id)
      

  3.   

    没有那么复杂吧,楼主试试这个。Select * from 表 A Where Not Exists (Select * from 表 Where table_id=A.table_id And App_level>A.App_level)
      

  4.   

    这样应该也可以:
    select * from 表 a,(select table_id,max(app_level) app_level from 表 group by table_id) b
    where a.table_id=b.table_id and a.app_level=b.app_level
      

  5.   

    paoluo(一天到晚游泳的鱼) 的查询可以实现可能被我想复杂了!结贴!!!