title: How to sort an array in BigQuery standard SQL?
body: <p>I am wondering if it is possible to order (apply order by) for individual array values in Google BigQuery?</p>
  
  <p>I am able to achieve this by applying order by on the whole transactonal base table first, then aggregating array; but when table is too large, resource errors appear for ordering by a large table.. </p>
  
  <p>So i am wondering if each individual array value can be ordered by using SQL or UDF.</p>
  
  <p>This was asked once <a href="https://stackoverflow.com/questions/16155023/order-of-data-in-bigquery-repeated-records">Order of data in bigquery repeated records</a> but it was 4,5 years ago. </p>