Hello I am new to big data and BigQuery. I have a following table:
colA colB
1 2
3 4
2 5
Now I want to create a new column that will have values that equals to sum(colA)/sum(colB) So it should look something like this:
colA colB colC
1 2 0.54
3 4 0.54
2 5 0.54
So to achieve this I write the following query:
Sum(colA)/sum(colB) as colC
But this is what I get:
colA colB colC
1 2 0.5
3 4 0.75
2 5 0.4
Could you help me on this.. I am trying to understand what I am doing wrong.