继续上图
一些demo
select min(sal),max(sal),avg(sal),sum(sal),count(*) from emp; --having 对分组结果进行过滤 select deptno,avg(sal) from emp group by deptno having avg(sal) > 2000;
时间: 2024-12-24 23:01:55
继续上图
一些demo
select min(sal),max(sal),avg(sal),sum(sal),count(*) from emp; --having 对分组结果进行过滤 select deptno,avg(sal) from emp group by deptno having avg(sal) > 2000;