Write SQL to get the top row of a column.
Assume the top row is the complete row with the highest non-NULL visit_count. If multiple rows share the highest value, return the row with the smallest encounter_id.
clinical_encounters.visit_count is NULL.visit_count, then lowest encounter_id.| Column | Type | Description |
|---|---|---|
| encounter_idPK | INT | Unique identifier for the encounter |
| patient_id | INT | Identifier of the patient |
| provider_name | VARCHAR(100) | Name of the assigned provider |
| encounter_type | VARCHAR(50) | Type of clinical encounter |
| visit_count | INT | Number of visits represented by the encounter record |