题目
表cust
表mark
(1)select avg(english) from mark;
(2) SELECT a. NAME, a.Address, a.Telno, b.math FROM cust a JOIN mark b ON a.Studentno = b.studentno WHERE a.Studentno in (202011,202012,202013,202014,202015);
(3) select a.Name,b.computer from cust a join mark b on a.Studentno=b.studentno order by b.computer desc;
(4) SELECT a.Studentno, a. NAME, sum( b.english + b.math + b.computer ) 总分 FROM cust a JOIN mark b ON a.Studentno = b.studentno GROUP BY a.Studentno HAVING sum( b.english + b.math + b.computer ) > 240 ORDER BY sum( b.english + b.math + b.computer ) DESC;