title: Flattening an array in SQL
body: <p>I am trying to flatten this array so that each neighbor has its own column. </p>
  
  <p>How do I write a query that allows me to flatten this array when I don't know the elements in the array?</p>
  
  <pre><code>SELECT deviceid,
         neighbors
  FROM
        `etl.routing_table_nodes`
  WHERE
         Parent = 'QMI-YSK'
  </code></pre>
  
  <p>And results currently look like: </p>
  
  <pre><code>Row deviceid    neighbors    
  1    OHX-ZSI    DMR-RLE  
                  WMI-YEK  
  2    OHX-ZFI    DMR-RLE  
                  QMI-YSK  
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/pOPNH.png" rel="nofollow noreferrer">Bigquery screenshot</a></p>