Question & Answer: e) Write the SQL statement that displays the number of students who play basketball f) Write the SQL…..

ENROLLMENT ST ID STUDENT COURSE SPORT ID SPORT NAME 1313 Basketball 1313 Foootball 5050 Basketball 8989 Basketball 1313 Tennis 7007 Soccer 7007 Foootball ID GRADE ST ID ST NAME 7007 James Bond COURSE ID 1313 Susan Brown COMP203 Computer Organization [COMP442 TITLE CREDITHR - COMP302 Database Systems 007 COMP206 At 7007 COMP302 7007 COMP442 1313 COMP203 1313 COMP302 B+ 5050 cOMP203C 1313 COMP442 A+ 5050 Susan Smith 8989 Megan Black COMP206 Data Structures Advanced Database Systems I 3 e) Write the SQL statement that displays the number of students who play basketball Write the SQL statement that displays the number of students who play basketball and are enrolled in Database Systems. f)

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’;

Still stressed from student homework?
Get quality assistance from academic writers!