Tell me about your experience writing basic SQL queries with window functions.
Use the tables below to return each active employee’s monthly sales rank within their region. Rows with a NULL in the ranking column are ignored.
region, employee_name, sale_month, monthly_sales, sales_rankregion, then sales_rank, then employee_name| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee name |
| region | VARCHAR(50) | Employee region |
| is_active | BOOLEAN | Whether the employee is active |
| Column | Type | Description |
|---|---|---|
| sale_idPK | INT | Unique sale identifier |
| employee_id | INT | Employee who made the sale |
| sale_month | DATE | Month of the sale, stored as the first day of the month |
| sale_amount | NUMERIC(12,2) | Sale amount |