Given a DataFrame, write PySpark code to find the highest and lowest salary without duplicates.
Asked in the technical round stage. For this SQL version, use the provided employee and salary tables and return the distinct salary extremes for recognized employees.
highest_salary and lowest_salary.| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee name |
| department | VARCHAR(80) | Employee department |
| Column | Type | Description |
|---|---|---|
| salary_record_idPK | INT | Unique salary record identifier |
| employee_id | INT | Employee associated with the salary record |
| salary | DECIMAL(12,2) | Recorded employee salary |