PrepAway - Latest Free Exam Questions & Answers

Which of the following describes the result if this statement is executed?

Given the following statement:
SELECT hyear, AVG(salary)
FROM (SELECT YEAR(hiredate) AS hyear, salary
FROM employee WHERE salary > 30000)
GROUP BY hyear
Which of the following describes the result if this statement is executed?

PrepAway - Latest Free Exam Questions & Answers

A.
The statement will return the year and average salary for all employees that have a salary
greater than $30,000, sorted by year.

B.
The statement will return the year and average salary for all employees hired within a given
year that have a salary greater than $30,000.

C.
The statement will return the year and average salary for all years that every employee hired
had a salary greater than $30,000.

D.
The statement will return the year and average salary for all years that any employee had a
salary greater than $30,000.

One Comment on “Which of the following describes the result if this statement is executed?


Leave a Reply