Student: table s student id name class number
Class table c: class # class class teacher
Curriculum k: class, class teacher
Result table g: class student id number grades
1) statistics each student's score, according to the results sorted in reverse chronological order
2) statistics for each class, each course grade average, according to the class, the result in reverse order
3) if students have duplicate data table, writing an article or group SQL delete duplicate data
CodePudding user response:
(1) select s. student number, the sum (grades)From s, g
Group by s. student id
The order by s. student id