Discuss / SQL / 滴~

o0stanley0o

#1 Created at ... [Delete] [Delete and Lock User]
SELECT class_id `班级`, ROUND(AVG(score), 2) average FROM students GROUP BY class_id
SELECT class_id `班级`, gender, ROUND(AVG(score), 2) average FROM students GROUP BY class_id, gender

  • 1

Reply