select a,count(*) as b from c group by a
union 
select 'total',count(*) as b from c
;

解决方案 »

  1.   

    select to_char(a),count(*) as b from c group by a
    union
    select 'overall',count(*) b from c;
      

  2.   

    试试这个吧:
    select a,count(*) from c group by rollup(a)
      

  3.   

    两种方法:
    1.group by rollup(a)
    2.group by cube(a)
    祝你好运
      

  4.   

    是不是应该这样?
    select 'total',count(*) as b from c
    union 
    select a,count(*) as b from c group by a
      

  5.   

    这么好用的东西我都不知道,xx
    rollup
    cube
    有什么区别亚