You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SUM(salary) OVER(PARTITION BY gender ORDER BY dem.employee_id) AS rolling_total
FROM employee_demographics dem
JOIN employee_salary sal
ON dem.employee_id = sal.employee_id
;
# you can also use this to add row numbers partitioned by categories and ordered by another col
# rank is simular, but scores ties as equal to eachother and assign the same number (positional rather than numerical scoring, so the number after a tie will be skipped)