Founding rate: RM5 off Basic, forever — applied automatically. See pricing

Menu
AirAsiaBasic

AirAsia — Route Profitability

AirAsia's network planning team wants to know which of five routes out of Kuala Lumpur is actually losing money, once fuel cost (which scales with distance) is netted against ticket revenue. You have three tables — routes, flights and bookings — at three different grains. Five sequential steps: revenue per flight, cost per flight, profit per flight (the join has a trap), profit normalized per kilometre flown, then the single route to cut.

Schema

airasia_routes
route_idTEXT
originTEXT
destinationTEXT
distance_kmINT
airasia_flights
flight_idSERIAL
route_idTEXT
flight_dateDATE
seats_availableINT
fuel_costNUMERIC(10,2)
crew_costNUMERIC(10,2)
airport_feesNUMERIC(10,2)
airasia_bookings
booking_idSERIAL
flight_idINT
fare_amountNUMERIC(10,2)

5 steps

  1. 1Total revenue per flight
  2. 2Total operating cost per flight
  3. 3Profit per flight, without fanning out the cost
  4. 4Normalize profit by distance flown
  5. 5Name the one route to cut

Basic

This is a Basic take-home

Multi-step case rounds — several questions on one shared dataset — unlock with a Basic plan.

See Basic plans

RM 25/mo · cancel anytime

Company names are trademarks of their respective owners, used here only to describe practice material. mahir_data is not affiliated with, endorsed by, or sponsored by any company named on this site. Terms.