redBus India interview question

Basic SQL Queries on group by, Joins