Home > OS >  Continuous data and add row when no data BIGQUERY
Continuous data and add row when no data BIGQUERY

Time:10-24

Pardon my English

I have data like this [RAW Data][1]g and I am trying to do 2 things

  1. Every "data" has a,b,c,d so when ever there is no a,b,c,d we will add it and add value 0
  2. Trying to make new column which sum continuous BUT calculated each code 0

If you could help I would really appreciate it; thank you guys.

I was trying many pieces of code I could find. But only continuous I can but unfortunately it is global continuous not continuous per code 2

SELECT tanggal,code, code2, data,

  SUM(data) OVER (ORDER BY DateT, Code 
                      ROWS BETWEEN UNBOUNDED PRECEDING 
                      AND CURRENT ROW) AS ContinousData



from`market-maker-328312.MarketMakerV2.MM16

enter image description here

  • Related