Pregunta de entrevista de Amazon

SQL code along with interviewer