Write a query to identify users who have had more than three failed transaction attempts within a five-minute window.
Use the users and transaction_attempts tables. Consider only attempts whose status is failed.
user_id, email, max_failed_attempts_in_5_minutes, and first_detected_at.user_id ascending.| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique user identifier |
| VARCHAR(255) | User email address |
| Column | Type | Description |
|---|---|---|
| attempt_idPK | INT | Unique transaction attempt identifier |
| user_id | INT | User associated with the attempt |
| attempted_at | TIMESTAMP | Timestamp when the attempt occurred |
| status | VARCHAR(50) | Outcome of the transaction attempt |