10. Check the student number and course number of the highest score in the score table. (sub-query or sort)
Select from where = (selectmax from score T)
11. Check the average score of each course.
12. Check the average score of the course with at least 5 students enrolled in the score table and begin with 3.
Select avg from where inch (selectfromgroupby haveCount(1)>= 5and like'3%';
13, the query score is greater than 70, less than 90 of the SNO column.
14. Sname, CNO and degree columns for all students are queried.
15. Check the SNO, CNAME and degree columns of all students.
Select from Join on =
16. Check the sname, CNAME and degree columns of all students.
Select from where = and = C.cno
17. Check the average score of the "95033" class students.
Select avg from Score T where in (selectfromwhere=' 95033')
18. Assume that a grade table is created using the following command:
CREATE table Grade (Low number (3), UPP number (3), rank char (1))
Insert into grade values (90,100, ' A ')
Insert into grade values (80,89, ' B ')
Insert into grade values (70,79, ' C ')
Insert into grade values (60,69, ' D ')
Insert into grade values (0,59, ' E ')
The SNO, CNO and rank columns of all students are now queried.
Database SQL statement Exercises 10--18