Select F1,min(F2) as F2 from tb group by F1

解决方案 »

  1.   

    select f1,max(f2) from tb group by f1
    select f1,min(f2) from tb group by f1
      

  2.   

    select f1,f2 from tb
    where exists(select distinct f1 from tb)
      

  3.   

    select f1,max(f2) f2 from tb group by f1
      

  4.   

    --如果你要f2的最大值
    select f1,max(f2) f2 from tb group by f1
    --如果你要f2的最小值
    select f1,min(f2) f2 from tb group by f1
      

  5.   

    select f1,max(f2) f2 from tb group by f1--或:select f1,min(f2) f2 from tb group by f1
      

  6.   

    select f1,max(f2) f2 from tb group by f1--或:select f1,min(f2) f2 from tb group by f1如果有其他列:select * from tb tem where f2=(select max(f2) from tb where t1=tem.t1)
      

  7.   

    select f1,max(f2) from tb group by f1
    select f1,min(f2) from tb group by f1
      

  8.   

    奇怪,我没说要求最大值最小值呀..怎么个个都用上max,min了... 回复人: crazycyber(没新意) ( ) 信誉:100  2003-09-18 11:48:00  得分:0 
     select f1,f2 from tb
    where exists(select distinct f1 from tb)就一个对...谢谢..:)