问题:求特定列中的值占总和的百分比。
select (sum(
case when deptno =10 then sal end)/sum(sal))*100 as pctfrom emp;本文共 153 字,大约阅读时间需要 1 分钟。
问题:求特定列中的值占总和的百分比。
select (sum(
case when deptno =10 then sal end)/sum(sal))*100 as pctfrom emp;转载于:https://www.cnblogs.com/liang545621/p/7523283.html