Write a SQL query to extract patient records that meet these three specific clinical criteria.
For this exercise, identify patients under 18 as of January 1, 2025, with an asthma encounter showing oxygen saturation below 92%, and an active albuterol prescription. Return one row per qualifying patient and use only records satisfying all three criteria.
patient_id, patient_name, and latest_qualifying_encounter.patient_id ascending.| Column | Type | Description |
|---|---|---|
| patient_idPK | INT | Unique patient identifier |
| patient_name | VARCHAR(100) | Patient display name |
| date_of_birth | DATE | Patient date of birth |
| Column | Type | Description |
|---|---|---|
| encounter_idPK | INT | Unique encounter identifier |
| patient_id | INT | Patient associated with the encounter |
| encounter_date | DATE | Date of clinical encounter |
| diagnosis_code | VARCHAR(20) | Diagnosis code recorded for the encounter |
| oxygen_saturation | INT | Oxygen saturation percentage |
| Column | Type | Description |
|---|---|---|
| medication_idPK | INT | Unique medication record identifier |
| patient_id | INT | Patient associated with the prescription |
| medication_name | VARCHAR(100) | Medication name |
| status | VARCHAR(20) | Prescription status |