1 month ago
11 lines310 B
SELECT name, department, salary, | |
RANK() OVER (PARTITION BY department ORDER BY salary DESC) AS rank | |
FROM employees; | |
| |
SELECT ordered_at, total, | |
SUM(total) OVER (ORDER BY ordered_at) AS running_total | |
FROM orders; | |
| |
-- Questions? Ask in the course forum. | |
| |
-- This is the version we use in the video. |