Database Management
Accenture PrimermediumDatabase Management07 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 produce an error.

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

The HAVING clause is incomplete — no value after '>', causing a syntax error.

Related Accenture Database Management questions

Practice more Accenture Database Management questions

PrimerDumps has 1400+ primer questions, 2026 mocks and coding hands-on — all free.