-- CREATE TABLE Account(ID INT(11),name VARCHAR(255),class VARCHAR(255))
-- CREATE TABLE Exam(id INT,course VARCHAR(255),Score INT,Aid INT)
-- Select a.class,e.course,e.score from account a,Exam e where a.id=e.aid
-- SELECT a.class,e.course,AVG(e.score) from account a,Exam e where a.id=e.aid GROUP BY a.class,e.course