title: How to insert query result into existing table in Google's BigQuery using SQL statement?
body: <p>I have a <strong>huge_query_that_runs_fine_alone</strong> that starts with <code>select</code>.</p>
  
  <p>I want to insert that query result into existing table, but usual SQL statements no work.</p>
  
  <p>I tried: insert into test_ds.test_tbl (field1, …, fieldN) values (<strong>huge_query_that_runs_fine_alone</strong>), but query editor says me that <code>select</code> keyword in unexpected place;</p>
  
  <p>And this: select * into test_ds.test_tbl from (<strong>huge_query_that_runs_fine_alone</strong>), but query editor says me this <code>Syntax error: Unexpected keyword INTO at [1:10]</code>;</p>
  
  <p>What to do?</p>
  
  <p>P.S. Full query...</p>
  
  <pre><code>insert into test_bq_dataset.test_tbl (Naimenovanie_SKU, Naimenovanie_TT, MonthNo, YearNo, AmountPromo, SumPromo, AmountNoPromo, SumNoPromo) values (select promos.Naimenovanie_SKU, promos.Naimenovanie_TT, promos.MonthNo, promos.YearNo, AmountPromo, SumPromo, AmountNoPromo, SumNoPromo from
  (select Naimenovanie_SKU, Naimenovanie_TT, MonthNo, YearNo, sum(Prodazhi_Litry) as AmountPromo, sum(Prodazhi_Summa_s_NDS) as SumPromo from IACloud0539_Calc.Data2_PROMO where Promo = false group by Naimenovanie_SKU, Naimenovanie_TT, MonthNo, YearNo) promos
  left join
  (select Naimenovanie_SKU, Naimenovanie_TT, MonthNo, YearNo, sum(Prodazhi_Litry) as AmountNoPromo, sum(Prodazhi_Summa_s_NDS) as SumNoPromo from IACloud0539_Calc.Data2_PROMO where Promo = true group by Naimenovanie_SKU, Naimenovanie_TT, MonthNo, YearNo) nopromos
  on
  promos.Naimenovanie_SKU = nopromos.Naimenovanie_SKU
  and
  promos.Naimenovanie_TT = nopromos.Naimenovanie_TT
  and
  promos.MonthNo = nopromos.MonthNo
  and
  promos.YearNo = nopromos.YearNo);
  </code></pre>
  
  <p><code>Syntax error: Unexpected keyword SELECT at [1:149]</code></p>