Your question is Third Highest Value with PySpark. 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.
CGI Group needs a compensation report for active employees in Canadian offices. Write a PostgreSQL query that returns one salary value based on the distinct eligible salaries.
employment_status = 'Active', a non-NULL salary, and an office in Canada.selected_salary.| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Employee identifier |
| employee_name | VARCHAR(100) | Employee name |
| department_id | INT | References departments.department_id |
| salary | NUMERIC(12,2) | Annual employee salary |
| employment_status | VARCHAR(20) | Current employment status |
| Column | Type | Description |
|---|---|---|
| department_idPK | INT | Department identifier |
| department_name | VARCHAR(100) | Department name |
| office_id | INT | References offices.office_id |
| Column | Type | Description |
|---|---|---|
| office_idPK | INT | Office identifier |
| office_name | VARCHAR(100) | Office name |
| country | VARCHAR(50) | Office country |
| city | VARCHAR(80) | Office city |