Do you know a tool that we can manipulate requests?
Write a PostgreSQL query that returns every request and, when available, its most recent attempt. Requests without attempts must remain in the result. The latest attempt is determined by the attempt timestamp, with the attempt ID resolving ties.
request_id ascending.request_id, endpoint, latest_status, latest_response_code, and latest_outcome.latest_outcome must be SUCCESS for response codes from 200 through 299, FAILED for other attempted responses, and NOT_ATTEMPTED when no attempt exists.| Column | Type | Description |
|---|---|---|
| request_idPK | INT | Unique request identifier |
| endpoint | VARCHAR(100) | API endpoint targeted by the request |
| method | VARCHAR(20) | HTTP-style request method |
| Column | Type | Description |
|---|---|---|
| attempt_idPK | INT | Unique attempt identifier |
| request_id | INT | Request associated with the attempt |
| status | VARCHAR(20) | Recorded attempt status |
| response_code | INT | Response code returned by the attempt |
| attempted_at | TIMESTAMP | Time when the attempt occurred |