Write a SQL query to detect repeated failures for the same test case across multiple runs.
Assume a failure is a test run whose status is failed, and a repeated failure requires at least two failed runs for the same test case.
test_case_id, test_case_name, failed_run_count, first_failed_at, and last_failed_at.failed_run_count descending, then test_case_id ascending.| Column | Type | Description |
|---|---|---|
| test_case_idPK | INT | Unique identifier for a test case |
| test_case_name | VARCHAR(150) | Human-readable test case name |
| Column | Type | Description |
|---|---|---|
| execution_idPK | INT | Unique identifier for a test execution |
| test_case_id | INT | Test case executed by the run |
| status | VARCHAR(20) | Execution status such as passed, failed, or skipped |
| run_at | TIMESTAMP | Timestamp when the test execution occurred |