ChatGpt user prompt query/message to compare values in single SQL Server table

SQLTable: APIResponse
APIName, ResponseTimeInSecs, RunID, RunDate
API1, 5, 22,2023-11-22,2009-06-15T13:45:30
API2, 7, 22,2023-11-22,2009-06-15T13:45:30
API3, 8, 22,2023-11-22,2009-06-15T13:45:30
API1, 5, 25,2023-11-22,2009-06-15T15:45:30
API2, 2, 25,2023-11-22,2009-06-15T15:45:30
API3, 3, 25,2023-11-22,2009-06-15T15:45:30

Can anyone help in sharing chat-gpt user prompt message to get below metrics
a. Get APINames who has performance improvement in RunID 25 when compared to RunID 22
This will return below result
APIName, ResponseTimeinSecs, RunID
API1,2,25
API2,3,25

b. Get APINames who has performance improvement in latest Run when compared to  previous run RunID 22
This will return below result. Based on RunDate, RunID 25 is latest so it needs to campare 25 with 22.
APIName, ResponseTimeinSecs, RunID
API1,2,25
API2,3,25