Your question is Employee Earnings SQL Challenge. Start with the requirements and the one table 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.
IBM's watsonx workforce analytics team needs to identify the highest potential earnings among employees. Each employee has a monthly salary and a number of months worked.
Write a PostgreSQL query that calculates each employee's total earnings as monthly_salary * months_worked, finds the highest total earnings, and counts how many employees have exactly that amount.
monthly_salary and months_worked are not null and both values are nonnegative.highest_total_earnings.employee_count.| Column | Type | Description |
|---|---|---|
| employee_idPK | INTEGER | Unique employee identifier |
| monthly_salary | NUMERIC(10,2) | Employee's monthly salary |
| months_worked | INTEGER | Number of months worked |