I have some 30000 rows in the table with the timestamp for every 10 mins and with some 20 columns.
timestamp Col1 Col2 Col3 ... col20
timestamp would be like every 10 mins. ex: 18-05-2012 20:07, 18-05-2012 20:17, 18-05-2012 20:27
Columns have integer or float data.
My question is: I need to find the gaps and time duration which the data has been not recorded in the columns. Suppose the column has Value, NULL, NULL, Value, Value, NULL. And it has the respective timestamps.
I need the output like as starttime and endtime of NULL values and duration (starttime – end time).
Okay, as I understood it now, you want the timedifference between the rows where in any column something was not recorded, right?
Then have a try with this:
To be honest, I’m not sure if this works, since you didn’t provide sample data to play around a bit.
To get the time difference in hh:mm:ss format search questions on stackoverflow, for example this one.