1:按name 分组查询后,并排序,
select count(*) from t_acount_addmoney t where id >161 group by name order by count(*) desc
2:按name 分组查询后,并排序,取出name ,总条数。
select t.name, count(*)from t_acount_addmoney t where id >161 group by name order by count(*) desc
3:按name 分组查询后,并排序,取出前10条记录的name ,总条数。
select * from (select t.name, count(*) from t_acount_addmoney t where id >161 group by name order by count(*) desc) where rownum <11