e) Write the SQL statement that displays the number of students who play basketball f) Write the SQL statement that displays the number of students who play basketball and are enrolled in Database Systems.
Expert Answer
e) select count(*) from STUDENT s, SPORT sp where s.ST_ID=sp.ST_ID and sp.SPORT_NAME=’Basketball’ ;
f) select count(*) from STUDENT s, SPORT sp, COURSE c, ENROLLMENT e where s.ST_ID=sp.ST_ID and sp.SPORT_NAME=’Basketball’ and s.ST_ID=e.ST_ID and e.COURSE_ID=c.COURSE_ID and c.COURSE_TITLE=’Database Systems’;