select max(jlsl) from (select count(*) as jlsl from table1 group by person )

解决方案 »

  1.   

    要得到什么结果?
    Select * 
      From table1
     Where Field1 in (Select id 
                       From table1 
                      Group by Field1
                        Having Count(*) = (Select Max(tb.cc)
                                             From (Select cc = Count(*) From table1 Group by Field1) AS tb))
      

  2.   

    select top 1 name,count(*) as yourcount from yourtable 
      group by name order by yourcount desc
      

  3.   

    补充,上面有个小错误
    Select * 
      From table1
     Where Field1 in (Select Field1
                       From table1 
                      Group by Field1
                        Having Count(*) = (Select Max(tb.cc)
                                             From (Select cc = Count(*) From table1 Group by Field1) AS tb))