Online College Support
 
STUDENT
 
FACULTY
 
SCHOOL
 
SUPPORT
 
PUBLIC
 
SIGNUP
DAILY QUIZ
 
     
  M U L T I M E D I A    T E S T    S Y S T E M
 
Question of the Day for 11/28/2026
 
Subject: Database Management


What does this query return?

WITH totals AS (
SELECT deptno, SUM(sal) AS total FROM emp GROUP BY deptno)
SELECT deptno, total
FROM totals
WHERE total > (SELECT AVG(total) FROM totals);
  1. Department 20 only (10875, above the average department total of 9675)
  2. Departments 20 and 30
  3. An error, because a CTE cannot be used in a subquery
  4. All three departments, because each total exceeds the average salary

Email Subscriptions: To receive Question of the Day via email, sign up for a student account and subscribe to the mailing lists of your choice on AP, SAT, and MCAT exams and college subjects.
     
 
Blog Posts    News Digest    Contact Us    About Developer    Privacy Policy

©1997-2026 ecourse.org. All rights reserved.