Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Find Duplicate Payment Transactions

MediumSQL · PostgreSQL00:00
Practice interviewer
In session
5 left
00:00

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 need to log in / sign up to run or submit.

Problem

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.

Schema

transactions
ColumnTypeDescription
transaction_idPKINTUnique transaction row identifier
account_idINTAccount associated with the transaction
merchant_nameVARCHAR(100)Merchant name for the transaction
transaction_dateDATEDate the transaction occurred
amountDECIMAL(10,2)Transaction amount
statusVARCHAR(20)Processing status of the transaction
Tablestransactions
Your solutionPostgreSQL
You need to log in / sign up to run or submit.
Run a query to see results