Interview Guides

You are given account records and asked to identify duplicate accounts using SQL. Return the duplicate groups for shared email values and shared phone_number values, along with the number of accounts in each group and the matching account IDs. Exclude rows where both identity fields are missing, and only return groups with at least two accounts.