Your question is SQL Top Salaried People. Start with the requirements and the two 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.
UKG Pro stores employee details separately from compensation records. Write a PostgreSQL query that returns the three highest-paid active salaried employees.
employee_id.Active and whose compensation type is Salary.| Column | Type | Description |
|---|---|---|
| employee_idPK | INTEGER | Unique employee identifier |
| full_name | VARCHAR(100) | Employee's full name |
| employment_status | VARCHAR(20) | Current employment status |
| Column | Type | Description |
|---|---|---|
| compensation_idPK | INTEGER | Unique compensation record identifier |
| employee_id | INTEGER | References ukg_employees.employee_id |
| pay_type | VARCHAR(20) | Compensation basis, such as Salary or Hourly |
| annual_salary | NUMERIC(12,2) | Annual salary amount |