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 student id,
The SUM (results) the AS scores
The result for the FROM
GROUP BY student number
The ORDER BY the SUM (grades) DESC;
CodePudding user response:
The