Skip to content
Advertisement

Calculating minutes between two timestamps in a pivot table

I have a SQL query that makes a pivot table showing the timestamps of various temperature points being collected. I need to add columns to show the difference between point 1 (126) and point 2 (120) and so on.

Here is the current query I am using to get the timestamps for each point

The query outputs this

SQL results

Advertisement

Answer

It looks to me like you can just add it to the final select. I don’t know if it has to go into another derived table before it will work.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement