Revenue per route
AirAsia wants total fare revenue for each route it flies.
Join routes to bookings and return each route's origin, destination, and total fare as total_revenue, for routes with at least one booking.
Schema
| id | INT |
| origin | TEXT |
| destination | TEXT |
| id | INT |
| route_id | INT |
| fare | NUMERIC(8,2) |
Basic
The example input, expected output, and walkthrough for this question unlock with a Basic plan.
Basic
The reference solution and walkthrough for this question unlock with a Basic plan.
Basic
This is a Basic question
Premium practice questions unlock with a Basic plan. The full solution, expected output, and grading are available to Basic members.
RM 25/mo · cancel anytime