title: cumulative sum before, cum sum after
body: <p>table_1</p>
  <pre><code>customer_id         month          subscription_price
  1               April    2020         49.0
  1               May      2020         49.0
  1               June     2020         49.0
  1               July     2020         49.0
  1               February 2021         29.0
  1               March    2021         29.0
  1               April    2021         29.0
  2               January  2020         15.0
  2               February 2020         15.0
  2               February 2021         30.0
  </code></pre>
  <p>Based on the table_1 above, I would like to transform the table into table_2:</p>
  <pre><code>     c_id     month          before  current after cum_sum_before     cum_sum_after
  0       1   April    2020   NaN     49.0    49.0        NaN         49+49+49+NaN+29+29+NaN
  1       1   May      2020   49.0    49.0    49.0         49            49+49+NaN+29+29+NaN 
  2       1   June     2020   49.0    49.0    49.0       49+49              49+NaN+29+29+NaN     
  3       1   July     2020   49.0    49.0     NaN       49+49+49              NaN+29+29+NaN
  4       1   February 2021   NaN     29.0    29.0       49+49+49                  29+29+NaN
  5       1   March    2021   29.0    29.0    29.0     49+49+49+29                    29+NaN
  6       1   April    2021   29.0    29.0     NaN    49+49+49+29+29                     NaN
  </code></pre>
  <p>(The additions are just for explanation purpose, I would expect the cum_sum to be integers, not as text).</p>
  <p>The query below</p>
  <pre><code>SELECT customer_id as c_id,month
       ,lag(subscription_price) over (partition by customer_id order by month asc) as before
       ,subscription_price as current
       ,lead(subscription_price) over (partition by customer_id order by month asc) as after
  FROM schema.table st
  </code></pre>
  <p>transforms table_1 into table_2 with <code>before, current, after</code>.
  How can I create the columns cumulative sum before and cumulative sum after?</p>