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.prime for prime rows and third_highest_salary for salary rows in result_type.NULL in non-applicable columns for each row type.2 and treat duplicate number values as one prime result.salary is NULL.employee_name in ascending order.| 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 |