第1个回答 2012-03-29
select xm,max(xb) as xb,sum(salary) from table group by xm;这里面对于xb这一项只能说是你选取最大的或者最小的,否则也没有意义
不对啊 我后来又看了一下 原来那个xb是表示性别啊 那既然是XB 为什么还有一个人两种性别状态的
第2个回答 2012-03-29
什么叫删除老工资记录啊。不太懂。
select xm,max(xb) xb,sum(salary) from table_name group by xm;
第3个回答 2012-03-29
select xm, salary,sum( salary) from a group by xm
第4个回答 2012-03-29
select xm ,max(xb) ,sum(salary) from GONGZ group by xm本回答被网友采纳