title: BigQuery GroupBy with STRUCT
body: <p>In BigQuery, I can successfully run the following query using standard SQL:</p>
  
  <pre><code>SELECT 
    COUNT(*) AS totalCount,
    city,
    DATE_TRUNC(timeInterval.intervalStart, YEAR) AS start
  FROM 
    sandbox.CountByCity
  GROUP BY 
      city, start
  </code></pre>
  
  <p>But it fails when I nest the <code>start</code> value in a STRUCT, like this...</p>
  
  <pre><code>SELECT 
    COUNT(*) AS totalCount,
    city,
    STRUCT(
      DATE_TRUNC(timeInterval.intervalStart, YEAR) AS start
    ) as timeSpan
  FROM 
    sandbox.CountByCity
  GROUP BY 
      city, timeSpan.start
  </code></pre>
  
  <p>In this case, I get the following error message:</p>
  
  <blockquote>
    <p>Cannot GROUP BY field references from SELECT list alias timeSpan at [10:11]</p>
  </blockquote>
  
  <p>What is the correct way to write the query so that the <code>start</code> value is nested within a STRUCT?</p>