TripElephant interview question

Write an SQL statement given the case study