For each patient with at least one admission, display: patient_id, admission_id, patient_name (full name), admission_date, doctor_name (full name). If a patient has multiple admissions on that same most-recent date, list all of them. Sort by patient_id ascending, then admission_id ascending. The column names and order must match the expected output.
Expected Output
Query Editor
User Output Ready
Execute a query or press Ctrl+Enter to view results...
Databases & Questions
Hint
For each patient you only need the latest admission, and then the doctor who handled it.