Netflix Interview Question

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