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
Michal Kurczabinski michk...@gmail.com [firebird-support] Mon, 04 Apr 2016 11:58:29 -0700
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