Your question is Find Duplicate Payment Transactions. Start with the requirements and the one table on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
You are given transaction data from an Accenture payment reconciliation workflow. Write a SQL query to find duplicate transaction records in the transactions table, where a duplicate means multiple rows share the same account_id, merchant_name, transaction_date, and amount. Return those duplicate groups along with how many times each duplicate appears.
| Column | Type | Description |
|---|---|---|
| transaction_idPK | INT | Unique transaction row identifier |
| account_id | INT | Account associated with the transaction |
| merchant_name | VARCHAR(100) | Merchant name for the transaction |
| transaction_date | DATE | Date the transaction occurred |
| amount | DECIMAL(10,2) | Transaction amount |
| status | VARCHAR(20) | Processing status of the transaction |