For each employee_id, what is returned as result_1?

Consider the following SQL statement:

SELECT employee_id, year, salary, avg(salary)

OVER

(PARTITION BY employee_id ORDER BY year ROWS BETWEEN 2 PRECEDING AND CURRENT ROW) as result_1

FROM employee

ORDER BY employee_id, year

For each employee_id, what is returned as result_1?
A . Three year rolling average salary
B . Four year rolling average salary
C . Average salary across all employee_id values
D . Average employee_id

Answer: A

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments