Firebird Groups Archive
- Home
firebirdsql.org
firebird-support
firebird-support
-
2016
firebird-support
-
April 2016
previous
previous in topic
first in topic
next in topic
next
Subject
Re: [firebird-support] How to add previous column value to current value?
Author
Michal Kurczabinski
Post date
2016-04-04T18:57:21Z
Try this:
select
t.name
, t.data, coalesce(t.data -(select data from t1 d where
d.id
=
t.id
-1),0) from t1 t
--
regards,
Michał Kurczabiński
previous
previous in topic
first in topic
next in topic
next