Your question is SQL: Prime and 3rd Highest Salary. 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 prime numbers and also return the 3rd highest salary.
Use the numbers and employees tables. Treat the third highest salary as the third distinct salary, and return every employee tied at that salary.
result_type, prime_number, employee_name, and salary.| Column | Type | Description |
|---|---|---|
| number_idPK | INT | Unique identifier for the number row |
| value | INT | Integer value to test for primality |
| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee's display name |
| salary | NUMERIC(12,2) | Employee salary |