题解 | #考试分数(一)#
考试分数(一)
https://www.nowcoder.com/practice/f41b94b4efce4b76b27dd36433abe398
SELECT job, ROUND(AVG(score), 3) FROM grade GROUP BY job ORDER BY AVG(score) DESC;
先用AVG()函数求平均值,再用ROUND(num, count)函数求四舍五入和保留后的值。
考试分数(一)
https://www.nowcoder.com/practice/f41b94b4efce4b76b27dd36433abe398
SELECT job, ROUND(AVG(score), 3) FROM grade GROUP BY job ORDER BY AVG(score) DESC;
相关推荐