Uber interview question

SQL Inner join and filtering