试一下,
Select id,max(data) From Table group by id这样写应该可以

解决方案 »

  1.   


    select * from Table where (id,data) in (Select id,max(data) From Table group by id)
      

  2.   

    单位   时间                 数量select * 
    from table as a
         (select id,max(date) as date  
            from table 
           group by id) as b
    where a.id = b.id 
      and a.date = b.date
      

  3.   

    select a.单位,a.时间,a.数量 from table a,(Select 单位,max(时间) 时间 From Table group by 单位) b where a.单位=b.单位 and a.时间 = b.时间;
      

  4.   


    select a.单位,a.时间,b.数量
    ( select 单位, max(时间) 时间,max(rowid) max_rowid from talbe) a
    ,table b
    where a.max_rowid=b.rowid