select 字段1,sum(字段1) from tab_name group by 字段1不幸的告诉你,用一条sql语句实现你上面的功能是不大可能的可以建个临时表来把取出来的数据插入临时表实现