TripElephant Interview Question

Write an SQL statement given the case study