Show all the sections whose enrollment is greater than 5. Display course and section number. Do two versions – one using a join and the other with a correlated subquery. (10 rows)
What will be an ideal response?
```
SELECT s.course_no, s.section_no
FROM section s
WHERE 5 < (SELECT COUNT(*)
FROM enrollment e
WHERE e.section_id = s.section_id)
```
```
SELECT course_no, section_no,
COUNT(student_id)
FROM section, enrollment
WHERE section.section_id = enrollment.section_id
GROUP BY course_no, section_no
HAVING COUNT(student_id) > 5
```
Computer Science & Information Technology
You might also like to view...
The data is not appended to your table until you click the ________ on the Query Tools Design tab
Fill in the blank(s) with correct word
Computer Science & Information Technology
Virtual private networks use which of the following to allow users to log in to the corporate network?
A. Private network B. Internet C. Intranet D. Extranet
Computer Science & Information Technology