I have a requirement where there are six amount columns. I want to run a select query that calculates the sum of the values in six columns for each row (not the SUM() that aggregates the values in a column for all records) and use the result in a new column in select query.
Example records:
id col1 col2 col3 col4 col5 col6
1 2.0 3.0 2.3 3.4 5.3 66
2 2.0 3.0 2.0 3.0 5.0 66
What I need is like below:
id cal_amt
1 82.0
2 81