LTM Limited Interview Question

SQL queries with join and finding duplicates