do you want to sum B for each value of A or jus total of B (like 2+3+6)?
If the second option is valid than you have to create a variable.
Sum(B) as totalB
Let vTotalB= Peek('totalB',0, 'tableA');
Drop Table tableA;
$(vTotalB) as totalB,
B/$(vTotalB) as C
Hope this helps
Instead of performing the calculations at script level you can perform the same at front end.
community 15.PNG 82.1 K