title: BigQuery , Union issue / Error: Syntax error: Expected keyword ALL or keyword DISTINCT but got keyword SELECT at [16:3]
body: <p>Currently, I'm trying to connect 4 tables together and display only 5 columns and union them all to one table.</p>
  
  <p>This is the query:</p>
  
  <pre><code>SELECT
    id,
    platform,
    url,
    profileImageUrl,
    name
  FROM (
    SELECT
      f.id AS id,
      f.platform AS platform,
      f.url AS url,
      f.profileImageUrl AS profileImageUrl,
      f.name AS name
    FROM
      `l.p.link_f_main` AS f UNION
    SELECT
      i.id AS id,
      i.platform AS platform,
      i.url AS url,
      i.profilePicture AS profileImageUrl,
      i.fullName AS name
    FROM
      `l.p.link_i_main` AS i UNION
    SELECT
      t.id AS id,
      t.platform AS platform,
      t.url AS url,
      t.profileImageUrl AS profileImageUrl,
      t.name AS name
    FROM
      `l.p.link_t_main` AS t UNION
    SELECT
      y.id AS id,
      y.platform AS platform,
      y.url AS url,
      y.profileImageUrl AS profileImageUrl,
      y.name AS name
    FROM
      `l.p.link_y_main` AS y ) as main
  </code></pre>
  
  <p>This is the error:</p>
  
  <pre><code>Error: Syntax error: Expected keyword ALL or keyword DISTINCT but got keyword SELECT at [16:3]
  </code></pre>
  
  <p>What am I doing incorrectly?</p>