知识点
1.按照job进行分组,计算平均值avg,round取三位小数,最后按照avg降序排序
代码
select job, round(avg(score),3) as avg
from grade
group by job
order by avg desc
1.按照job进行分组,计算平均值avg,round取三位小数,最后按照avg降序排序
select job, round(avg(score),3) as avg
from grade
group by job
order by avg desc