LTM Limited interview question

SQL queries with join and finding duplicates