oracle之sql总结2之groupby having ,where in 别名排序

it2025-11-04  11

1、select avg(sal) , max(sal) ,deptno from emp group by deptno;

2、     select avg(sal) , max(sal) ,deptno,job from emp group by deptno,job;

3、     select avg(sal) ,deptno from emp group by deptno having avg(sal)<2000;

 

转载于:https://www.cnblogs.com/kunpengit/archive/2012/02/24/2367044.html

相关资源:数据结构—成绩单生成器
最新回复(0)