PrepAway - Latest Free Exam Questions & Answers

Which SQL statement will retrieve the department number (WORKDEPT) and average departmental salary (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?

PrepAway - Latest Free Exam Questions & Answers

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


Leave a Reply