Thread: Calculate difference between rows

Calculate difference between rows

From
Detlef Jockheck
Date:
Hi,

I have a table with two columns of the type

a date, b float:
2003-02-01, 47.2
2003-02-07, 26
2003-02-09, 55

Now I want to calculate a delta(b) / delta(a) from row to row. How can I
solve this in pgsql?

ciao
Detlef

--
# Dipl. Ing. (FH) Detlef Jockheck
# E-mail: detlef@jockheck.de
# -------------------------------