Database Management
Accenture Technical PrimermediumDatabase Management7. Joins & Subquery

Which SQL statement produces an error?

Answer options

A
SELECT job_id, SUM(salary) FROM emp_dept_vu WHERE department_id IN (10,20) GROUP BY job_id HAVING SUM(salary) > ;
B
SELECT * FROM emp_dept_vu;
C
SELECT department_id, job_id, AVG(salary) FROM emp_dept_vu GROUP BY department_id, job_id;
D
None of these

Correct answer: SELECT job_id, SUM(salary) FROM emp_dept_vu WHERE department_id IN (10,20) GROUP BY job_id HAVING SUM(salary) > ;

Explanation

Quick AnswerThe correct answer is SELECT job_id, SUM(salary) FROM emp_dept_vu WHERE department_id IN (10,20) GROUP BY job_id HAVING SUM(salary) > ; because it directly addresses the core logic of Database Management.

The HAVING clause is incomplete — missing the value after >.

Related Accenture Database Management questions

Practice more Accenture Database Management questions

PrimerPrep has 1400+ practice questions, 2026 simulations and coding hands-on — all free.

Watch Walkthroughs!