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.

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...

Using a P3P-enabled Web browser, choose the highest level of privacy and then visit a Web site that has previously offered you personalized services. Describe what happens. Give an explanation

What will be an ideal response?

Computer Science & Information Technology

The Query Wizard offers more flexibility in generating queries than the Design View

Indicate whether the statement is true or false

Computer Science & Information Technology

Match the following terms to their meanings:

I. Append query II. Find Unmatched query III. Find Duplicates query IV. Make table query V. Totals query A. creates a new table by extracting data from one or more tables B. locates identical records in a table C. locates unmatched records D. adds new records to existing database from another database E. calculates subtotals across groups of records

Computer Science & Information Technology

Which document defines the services and products the vendor agrees to supply and the time frames in which to supply them?

A. Statement of work (SOW) B. Memorandum of understanding (MOU) C. Multi-source agreement (MSA) D. Service level agreement (SLA)

Computer Science & Information Technology