sql直接排序,选前十,参考
mssql:select top 10 * from 表 order by total_amount
mysql:select * from 表 order by total_amount limit 10
Oracle:select * from (select * from 表 order by total_amount) where rownum<=10 order by rownum asc
==========
mysql:select * from (select ID,apply_name,sum(total_amount) as total_amount from m_traffic group by ID,apply_name) order by total_amount limit 10