hw3-sol - File: /home/anand/Temp/Homework_3_solution.txt...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
File: /home/anand/Temp/Homework_3_solution.txt Page 1 of 2 Solution to 8.16 ------------------------------------------ (a) SELECT Name FROM STUDENT WHERE Major='COSC' (b) SELECT CourseName FROM COURSE, SECTION WHERE COURSE.CourseNumber=SECTION.CourseNumber AND Instructor='King' AND (Year='85' OR Year='86') Another possible SQL query uses nesting as follows: SELECT CourseName FROM COURSE WHERE CourseNumber IN ( SELECT CourseNumber FROM SECTION WHERE Instructor='King' AND (Year='85' OR Year='86') ) (c) SELECT CourseNumber, Semester, Year, COUNT(*) FROM SECTION, GRADE_REPORT WHERE Instructor='King' AND SECTION.SectionIdentifier=GRADE_REPORT.SectionIdentifier GROUP BY CourseNumber, Semester, Year (d) SELECT Name, CourseName, C.CourseNumber, CreditHours, Semester, Year, Grade FROM STUDENT ST, COURSE C, SECTION S, GRADE_REPORT G WHERE Class=5 AND Major='COSC' AND ST.StudentNumber=G.StudentNumber AND G.SectionIdentifier=S.SectionIdentifier AND S.CourseNumber=C.CourseNumber (e) SELECT Name, Major
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/31/2011 for the course EEL 4852c taught by Professor Tu during the Fall '08 term at University of South Florida.

Page1 / 2

hw3-sol - File: /home/anand/Temp/Homework_3_solution.txt...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online