I have a table that stores the status changes of a ticket. Some tickets were re-opened after being closed. And in certain cases (example below) re-opened several times.
Ticket SEQUENCE NEWVALUE OLDVALUE TIMESTAMP
5879 15870 REQUEST NULL 2015-06-10 12:13:28.000
5879 16256 Pending REQUEST 2015-06-11 14:26:38.000
5879 21642 Open Pending 2015-07-02 13:32:47.000
5879 21943 Pending Open 2015-07-06 09:55:37.000
5879 23195 Open Pending 2015-07-09 15:00:47.000
5879 24917 Pending Open 2015-07-17 15:09:28.000
5879 25903 Closed Pending 2015-07-22 11:13:03.000
5879 25940 Open Closed 2015-07-22 12:56:05.000
5879 25972 Pending Open 2015-07-22 13:54:30.000
5879 25996 Closed Pending 2015-07-22 14:31:05.000
5879 26484 Pending Closed 2015-07-24 14:43:28.000
5879 26776 Closed Pending 2015-07-27 11:34:00.000
I am trying to determine the last time a ticket was Closed. But I have no idea how to even begin this query. Could someone provide a clue? Thanks so much!
Aucun commentaire:
Enregistrer un commentaire