IBM Exam Questions

Which SQL statement will retrieve the department number (WORKDEPT) and average departmental salary (

Which SQL statement will retrieve the department number (WORKDEPT) and average
departmental salary (SALARY) for all departments in a table named EMPLOYEE and
arrange the result set in ascending order by average departmental salary?

A.
SELECT workdept, AVG(salary) FROM employee GROUP BY workdept ORDER BY 2

B.
SELECT workdept, AVERAGE(salary) FROM employee GROUP BY workdept ORDER
BY 2

C.
SELECT workdept, AVG(salary) FROM employee ORDER BY workdept ARRANGE BY
2

D.
SELECT workdept, AVG(salary) FROM employee ORDER BY workdept GROUP BY 2