Your question is SQL Aggregates Over Salaries. Start with the requirements and the three tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Swiggy's Business Analytics team needs a payroll snapshot for currently active employees. Write a PostgreSQL query that combines employee, department, and salary data to calculate salary statistics.
employment_status is Active.NULL values correctly.| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee's full name |
| department_id | INT | Assigned department identifier |
| employment_status | VARCHAR(20) | Current employment status |
| Column | Type | Description |
|---|---|---|
| department_idPK | INT | Unique department identifier |
| department_name | VARCHAR(100) | Swiggy department name |
| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Employee identifier |
| monthly_salary | NUMERIC(12,2) | Monthly salary in INR |