title: Classic banking task
body: <p>I think this is a usual task in banking area.
  I need to fill <strong>'Income'</strong> column by previous values from <strong>'Outcome'</strong>. But every 'Outcome' value calculated like <strong>Outcome</strong> = <strong>Income</strong> + <strong>Debit</strong> - <strong>Credit</strong> from current row (each rows).</p>
  <p>I guess I should use <em>lag()</em> for <strong>'Income'</strong>. But this creates cyclicality in calculating.</p>
  <p>I hope this can help:</p>
  <p><code>create table account(acc_date date,income int, debit int, credit int, outcome int);
  insert into account values('2021-01-01', 100,800,500,400),
  ('2021-02-01', null,900,1500,null),
  ('2021-03-01', null,1700,2000,null),
  ('2021-04-01', null,2100,2800,null),
  ('2021-05-01', null,3500,4000,null);
  select * from account;
  </code></p>