How can I perform linear interpolation using oracle SQL?
I am trying to use Oracle 11g (11.1 in dev, 11.2 in production) for numeric analysis, specifically linear interpolation on a table which has three columns of interest: a timestamp, a deviceid, and value. The value columns holds data from the device (with id deviceid), taken at the time given in the timestamp. For example, this is bogus data, but it gives the idea: time | deviceid | value ----------------|------------|----------- 01:00:00.000 | 001 | 1.000 01:00:01.000 | 001 | 1.030 01:00:02.000 | 001 | 1.063 01:00:00.050 | 002 | 553.10 01:00:01.355 | 002 | 552.30 01:00:02.155 | 002 | 552.43