Write a SQL query to identify users with more than 3 failed login attempts. Use the users and login_attempts tables. Count only attempts whose status is failed.
user_id, username, and failed_attemptsfailed_attempts descending, then user_id ascending| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique identifier for the user |
| username | VARCHAR(100) | Display username |
| Column | Type | Description |
|---|---|---|
| attempt_idPK | INT | Unique identifier for the login attempt |
| user_id | INT | User associated with the attempt |
| status | VARCHAR(20) | Login result, such as failed or successful |
| attempted_at | TIMESTAMPTZ | Time of the login attempt |