title: name is not recognized using standard sql bigquery
body: <p>I am calculating the amount of each 'Name' and sort it out by ID in a nested query. What I did is just i put the COUNT(Name) in SELECT. However, the code returns an error that it does not recognize column 'Name' as the FROM is in the inner statement.  My code is :</p>
  
  <pre><code>SELECT
     User_ID, 
      COUNT(Name) AS Total,
  
   SUM(CASE WHEN Language = 'EN' THEN 1 ELSE 0 END) AS EN,
  
   FROM (
     SELECT 
      User_ID, 
  
        CASE 
          WHEN Language in ('EN', 'English') THEN 'EN' 
          WHEN Language in ('MY', 'Malay')  THEN 'MY' ELSE Language 
        END AS Language,
  
     FROM 'table'
     GROUP BY User_ID, Language
   )
   GROUP BY User_ID
  </code></pre>
  
  <p>What should I fix to remove the error? </p>