Pregunta de entrevista de Lyft

SQL question - walk through thought process, and write out query