title: Resources exceeded BigQuery
body: <p>When running the following query I got the error:</p>
  
  <p>Resources exceeded during query execution: The query could not be executed in the allotted memory. Peak usage: 158% of limit. Top memory consumer(s): sort operations used for analytic OVER() clauses: 98% other/unattributed: 2%</p>
  
  <pre><code>select *, row_number() over(PARTITION BY Column_A ORDER BY Column_B)
  from
  (SELECT
  *
  FROM
    Table_1 UNION ALL
  SELECT
    *
  FROM
    Table_2 UNION ALL
  SELECT
    *
  FROM
    Table_3
  )
  </code></pre>
  
  <p>Can someone help me how to change this query or is there possibility that we can change the memory limit in bigquery?</p>