What is a window function, and how does PARTITION BY differ from GROUP BY?
Explain how a window function works. Suppose you need to display each employee's salary alongside the average salary in their department. How would a query using AVG(salary) OVER (PARTITION BY department_id) differ from one using GROUP BY department_id?
ExplainWindow functionsJuniorAnalystData EngineerBackend