Your question is Second Youngest Age in SQL. 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.
LatentView Analytics wants to validate age-based workforce reporting for its active analysts. Write a PostgreSQL query to find the second-youngest distinct age among employees whose current workforce status is Active.
employees with employee_statuses using employee_id.second_youngest_age.| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee name |
| age | INT | Employee age |
| Column | Type | Description |
|---|---|---|
| status_idPK | INT | Unique status record identifier |
| employee_id | INT | References employees.employee_id |
| current_status | VARCHAR(20) | Current workforce status |