Pregunta de entrevista de Netflix

SQL queries to find time difference between two events given certain condition.