Given a transaction table, write a query to detect potential fraud by identifying accounts that performed more than three transactions within a five-minute window for Idfc First Bank.
Use the transactions table. Treat transactions exactly five minutes apart as part of the same window.
account_id, window_start, window_end, and transaction_countaccount_id, then window_start ascending| Column | Type | Description |
|---|---|---|
| transaction_idPK | BIGINT | Unique transaction identifier |
| account_id | VARCHAR(20) | Idfc First Bank account identifier |
| transaction_ts | TIMESTAMP | Timestamp when the transaction occurred |
| amount | NUMERIC(12,2) | Transaction amount in Indian rupees |