输入表是
eno ename sal
10 satish 1000
20 soujanya 1300
10 satish 2000
20 soujanya 1500
输出表如
emp ename sal
10 satish 3000
20 soujanya 2800
答案 0 :(得分:1)
我想你需要这个:
select eno, ename, sum(sal) from t group by eno, ename
答案 1 :(得分:0)
select eno, ename, sum(sal) over (partition by eno order by ename) from t