Subject Re: [firebird-support] How to add previous column value to current value?
Author Michal Kurczabinski
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