select b,max(c)
from A
group by b

解决方案 »

  1.   

    分组求Max,Min,Sum,AGV,Count都可以这样用 !!
      

  2.   

    create table A
    (
       a  int IDENTITY (1,1)NOT NULL,
       b  varchar(10),
       c  varchar(10)
    )
    insert A
    select '001','1001' union
    select '001','2001' union
    select '002','1001' union
    select '003','1002' union
    select '003','2002' union
    select '004','1003'select b,max(c) from A group by b
      

  3.   

    select b,c=max(c)
    from 表
    group by b
      

  4.   

    select b,max(c)as c
    from 表
    group by b
      

  5.   

    select b,c=max(c)
    from 表
    group by b
      

  6.   

    select * from A t
    where c=(select max(c) from A where b=t.b)
      

  7.   

    select b,max(c) as c from testing02 group by b
      

  8.   

    select b,max(c) as c from A group by b
      

  9.   

    select b,max(c) as 'c'
    from A
    group by b
      

  10.   

    select b,c=max(c)
    from 表
    group by b
      

  11.   

    select b,c=max(c) from A group by b
      

  12.   

    select b,max(c) as c from A group by b