Explore Library
Quiz

Correlated Subquery vs CTE Behavior

Understand how correlated subqueries, CTEs, and window functions differ in reference and execution.

You want each employee's salary alongside their department's average salary, keeping every individual row. Which approach is the most appropriate single-pass solution?