select deptno,round(avg(sal),2) sal_avg
from emp
where
mgr is not null
group by
deptno
order by
sal_avg asc limit 2;
关键字的执行顺序:
from->where->group by->select->having->orther by->limit
SQL语句关键字执行顺序
最新推荐文章于 2023-08-15 18:51:19 发布
select deptno,round(avg(sal),2) sal_avg
from emp
where
mgr is not null
group by
deptno
order by
sal_avg asc limit 2;
关键字的执行顺序:
from->where->group by->select->having->orther by->limit