2
I have a table called chamado_processos
with the following structure and data
As you can see one of the columns of this table called dt_processo
is a field DATETIME
and the column tp_processo
defines whether the process is beginning or stop.
I would like to calculate the time between each so-called recital a single called may have more than one start process and more than one stopping process.
That call I showed in the picture has 00:02:17
hours, minutes and seconds.
What have you ever done? If you have more than one start is worth the oldest? If you have more than one finish is worth the newest?
– Ricardo
It is rather ample your questioning by more than one start process and more than one stopping process simulate this also in your inquiry? How can I define which one to take/add from which?
– novic
The process time will only be calculated if the last process of the call has the
tp_processo = P
– Vinicios Yals
So if there is more than one process for example an I and P, I and P, it should add up the two times and so on, I was clearer?
– Vinicios Yals