#148

Most Recent Booking per Cabin

Captains want a quick summary of each cabin's most recent guest in case follow-up is needed. For every cabin booked at least once, output the cabin id, the latest passenger's name, and the end_date of that booking.

Expected output sample

This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables.

namecabin_idend_date
Mia12024-05-03
Noah22024-01-20
Eliza32024-02-03

Your query result will appear here