Calculate difference between rows

From: Detlef Jockheck <detlef(at)jockheck(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Calculate difference between rows
Date: 2003-03-04 20:56:26
Message-ID: 200303042056.h24KuQI04724@krakatau.jockheck.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)jockheck(dot)de
# -------------------------------

Browse pgsql-general by date

  From Date Subject
Next Message Dennis Gearon 2003-03-04 21:25:30 Re: Manuales -Tutoriales
Previous Message Richard Welty 2003-03-04 20:54:20 Re: LinuxQuestions Award