Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

2. (TCO 7) Which of the following statements is correct? (Points : 3) WHERE oper

ID: 3823352 • Letter: 2

Question

2. (TCO 7) Which of the following statements is correct? (Points : 3)        WHERE operates on groups formed by aggregate functions and HAVING operates on individual rows.
       WHERE can only be used along with HAVING.
       HAVING can only be used along with WHERE.
       WHERE operates on individual rows and HAVING operates on groups formed by aggregate functions.

       5 and below
       5 to 9
       5 and above
       9 and above

Question 3. 3. (TCO 7) Given the books table described below, which of the following will display each category along with the average price of books in that category?
books:   bookid(PK), ISBN, title, pubdate, cost, retail, category, pubid(FK) (Points : 3)        SELECT category, AVG(retail) FROM books;
       SELECT AVG(retail) FROM books GROUP BY category;
       SELECT category, AVG(retail) FROM books GROUP BY category;
       SELECT category, AVG(retail) FROM books GROUP BY category, retail;

Explanation / Answer

Question 2: d) WHERE operates on individual rows and HAVING operates on groups formed by aggregate functions.

Explanation:

Thus, option d is correct.

Question 3: c) SELECT category, AVG(retail) FROM books GROUP BY category;

Explanation:

Thus, option c is correct.

Question 4: b) SELECT MAX(retail) FROM books WHERE category = ‘COMPUTER’;

Explanation:

Thus, option b is correct.

Question 5: b) A single value

Explanation:

Thus, option b is correct.

Question 6: c) EXISTS

Explanation: The EXISTS clause returns TRUE if one or more rows are returned by the sub query.

Thus, option c is correct.

Question 7: c) SELECT lastname, firstname FROM customer WHERE customerid = (SELECT customerid FROM order WHERE shipdate IS NULL);

Explanation:

Thus, option c is correct.

Question 8: c) SELECT customerid, COUNT(orderid) FROM order GROUP BY customerid;

Explanation:

Thus, option c is correct.

Question 9: b) SELECT category, AVG(retail) FROM books GROUP BY category:

Explanation:

Thus, option b is correct.

Question 10: d) 9 and above

Explanation:

Thus, option d is correct.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote