Your question is Top Earners via Table Join. 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.
Motorola Solutions is reviewing compensation data for employees supporting the APX radio product line. Write a PostgreSQL query to find the top three employees by total recorded earnings.
LEFT JOIN from employees to employee_earnings so employees without earnings records remain eligible with total earnings of zero.employee_id.| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee's full name |
| job_title | VARCHAR(100) | Employee's role |
| Column | Type | Description |
|---|---|---|
| earning_idPK | INT | Unique earning record identifier |
| employee_id | INT | Employee receiving the earning |
| earning_amount | DECIMAL(12,2) | Recorded earning amount |
| earning_type | VARCHAR(30) | Type of earning record |