#149

Captain Earnings

The platform pays captains a share of cabin bookings and ranks them monthly. For each captain, output the name and the total revenue from bookings across all their cabins, sorted from highest to lowest.

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.

nametotal_income
Sophia2550.00
Liam1530.00
Noah800.00

Your query result will appear here