RienSQL
TASK #116 · Medium · T-Bank

Top 3 pilots by number of passengers

Your brief
Display the top 3 captains (first_pilot_id) who have transported the most passengers. Use the plane capacity as the number of passengers. Display the captain pilots’ names and the number of passengers transported, sorted in descending order by the number of passengers.
Expected columnsname total_passengersT-Bank
SQL editor
SQLite
Ctrl / ⌘ + ↵
Result

Write a query and run it to see the results.

Schema
Flightsflight_id, flight_date, plane_id, first_pilot_id, second_pilot_id, destination
Pilotspilot_id, name, age
Planesplane_id, plane_name, capacity, cargo_flag