Query ready
SELECT name, salary,LAG(salary) OVER (ORDER BY salary) AS next_lower,LEAD(salary) OVER (ORDER BY salary) AS next_higherFROM users;
Click any line to inspect its stage
Execution Board
01 · FROM
Scanning every tuple of the relation from working storage before filtering or projection.