with calc_table as ( select YEAR(acquisition_date) as acq_year ,count(artwork_id) as cnt from artworks group by 1 ) , calc_table2 as ( select * ,lag(cnt, 1) over (order by acq_year asc) as prev_cnt from calc_table where acq_year is not null ) select acq_year as 'Acquisition year' , cnt as 'New acquisitions this year (Flow)' , sum(cnt) over (order by acq_year) as 'To..