天天看点

oracle group by表案例,oracle复杂表查询之数据分组、group by、having使用

oracle group by having

—max min avg sum count

select max sal min sal from emp

select avg sal sum sal from emp

avg null

select sum comm /count * from emp

count * null

avg sal null null select sum sal /count * from emp

select count * from emp

?count

count sal 0

select max sal from emp

select ename job from emp where sal= select max sal from emp

? 1 select

2 sql

3 select oracle

select avg sal from emp

select * from emp where sal>(select avg(sal) from emp);