I have a request_history table as follows.
How can I get the datediff in minutes for time between when rid 104 was in QA Ready status and then Sign Off status
ID | rid | Status | Total_Mins | SLA_Mins | Stat_Date | Stat_Time |
16 | 104 | Submitted | 0 | 0 | 3/18/2013 | 11:19:35 AM |
18 | 104 | SM Assigned | 80 | 80 | 3/18/2013 | 12:40:22 PM |
24 | 104 | Database Updated | 0 | 80 | 3/18/2013 | 12:40:22 PM |
37 | 104 | Assign Ready | 1072 | 1152 | 3/19/2013 | 6:32:31 AM |
70 | 104 | Assigned | 331 | 1483 | 3/19/2013 | 12:04:16 PM |
71 | 104 | In Progress | 1 | 1483 | 3/19/2013 | 12:04:41 PM |
72 | 104 | QA Ready | 1 | 1484 | 3/19/2013 | 12:05:42 PM |
176 | 104 | QA In Progress | 1689 | 3173 | 3/20/2013 | 4:15:05 PM |
177 | 104 | Sign Off | 1 | 3173 | 3/20/2013 | 4:15:56 PM |
212 | 104 | Complete - Verbally Sign Off | 1068 | 4241 | 3/21/2013 | 10:04:24 AM |