Good morning,
In the following table is an extract from the otrs.ticket_history table where it depicts a log of the status changes of a ticket / request:
Thegoalistogetatablelike:
in which the sum of the time in minutes (I used the TIMESTAMPDIFF function) has been grouped in each state.
Example: In ticket 50383, 2658 minutes elapsed between 2/27/2017 6:31 p.m. (id 917593) and 3/1/2017 2:50 p.m. (id 918771).
And so on to other states. (if it is the last state of the ticket the difference must be calculated between the beginning of the last state and the current moment, for example function now ().
Is it possible to produce such a table with SQL only? I only have read permissions on this database.
Thank you.