Your question is SQL Top 10 Highest Paid. 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.
Write a SQL query to find the top 10 highest-paid employees in a database.
Use the employee and department data available in the schema. Exclude employees without a salary and retain employees whose department does not have a matching record.
employee_id, employee_name, salary, and department_nameemployee_id| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee full name |
| department_id | INT | Referenced department identifier |
| salary | NUMERIC(12,2) | Annual employee salary |
| Column | Type | Description |
|---|---|---|
| department_idPK | INT | Unique department identifier |
| department_name | VARCHAR(100) | Department name |