Uber interview question

Some SQL questions around joins and ranking