select hh,hm,dzm,sum(total) from abc group by hh,hm,dzm;

解决方案 »

  1.   

    hm,dzm 不是分组字段,不可以
      

  2.   

    select hh,hm,dzm,sum(total) 
    from abc 
    group by hh,hm,dzm
    将你想显示的字段都group by
      

  3.   

    select b.hh,b.tt,a.hm,a.dzm from abc a,(select select hh,sum(total) tt from abc group by hh) b试试
      

  4.   

    好像有点问题,可能需要如下改进:
    select b.hh,b.tt,a.hm,a.dzm from abc a,(select select hh,sum(total) tt from abc group by hh) b group by a.hh