11 months ago
9 lines265 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. |