Quantcast
Channel: ITPUB论坛-专业的IT技术社区
Viewing all articles
Browse latest Browse all 18583

sum的分析函数疑惑

$
0
0
SELECT sum(sal) over(partition by t.deptno order by sal),--部门累加薪水 sum(sal) over(partition by t.deptno)--部门总薪水 FROM emp t 刚才在写sql遇到个需求,是根据部门的求和,一开始我写成了sum(sal) over(partition by t.deptno order by sal) ...

Viewing all articles
Browse latest Browse all 18583

Trending Articles