Interview practice question
Detecting rapid repeated transactions
Data Engineering · SQL · Experienced
Flag card transactions where the same card was used more than 3 times within 1 minute.
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Use a window per card ordered by time.
- Count transactions in a 1-minute range window, or compare with LAG by 3.
- Self join with a time condition is an alternative but expensive.
- Flag every transaction in a suspicious burst.
- For real time, this belongs in a streaming engine.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.