title: Re-use BigQuery window function partition
body: <p>I need to select multiple columns as part of a LEAD statement. This <em>looks</em> like it will be really inefficient, tripling the number of sorts and partitions required -></p>
  
  <pre><code>SELECT 
      field,
      field2,
      field3,
      LEAD(field, 1) OVER (PARTITION BY field ORDER BY field ASC) AS nextField,
      LEAD(field2, 1) OVER (PARTITION BY field ORDER BY field ASC) AS nextField2,
      LEAD(field3, 1) OVER (PARTITION BY field ORDER BY field ASC) AS nextField3,
  FROM dataset.table
  </code></pre>
  
  <ul>
  <li>Is there a better way to do this?</li>
  <li>Does BigQuery optimize for this at query runtime to make it efficient?</li>
  </ul>