i have 2 tables. The first one contains an ID from a machine and the other one contains the same ID but from the end of the process.
What i need is to calculate the time between the last value of table 1 (2021-01-06 03:07:50) and the time in table 2 (2021-01-07 02:45:00)
But the query returns the value 0.
What do i have to change in my query that i can calculate the time between these two timestamps?
Or is there a better way to achive this?
My query is the following