Explain how you use SQL queries and APIs together, and how OOP concepts show up in your personal projects.
For a representative implementation, write a query over the supplied API request and SQL execution records, then explain how an application could expose or consume this data through an API.
endpoint, request_count, successful_request_count, avg_sql_duration_ms, and sql_execution_count| Column | Type | Description |
|---|---|---|
| request_idPK | INT | Unique API request identifier |
| endpoint | VARCHAR(100) | Requested API endpoint |
| response_status | INT | HTTP response status code |
| requested_at | TIMESTAMP | Time when the API request was received |
| Column | Type | Description |
|---|---|---|
| execution_idPK | INT | Unique SQL execution identifier |
| request_id | INT | API request associated with the SQL execution |
| duration_ms | DECIMAL(10,2) | SQL execution duration in milliseconds |