title: Google Big Query : Window Function Row Wise Cumulative Sum Across Columns
body: <p>I am looking to calculate cumulative sum across columns in Google Big Query.</p>
  
  <p>Assume there are five columns <code>(NAME,A,B,C,D)</code> with two rows of integers, for example:</p>
  
  <pre><code> NAME | A | B | C | D
  ----------------------
   Bob  | 1 | 2 | 3 | 4
   Carl | 5 | 6 | 7 | 8
  </code></pre>
  
  <p>I am looking for a windowing function or UDF to calculate the cumulative sum across rows to generate this output:</p>
  
  <pre><code> NAME | A | B  | C  | D
  -------------------------
   Bob  | 1 | 3  | 6  | 10
   Carl | 5 | 11 | 18 | 27
  </code></pre>
  
  <p>Any thoughts or suggestions greatly appreciated!</p>