[Solved] multiply and SUM() MS SQL


@fia Maybe you should do your calculation elsewhere first for example on paper or in Excel to ensure you know exactly what you should get. It would also help you figure out the order of the calculation before writing it in SQL. According to the figures shown the values you’ve stated seems to be correct i.e 22,720 for multiply then sum the figures as is, or 5,920 if you use the Absolute value of the second column. If both columns use absolute values then it will also give 22,720. If you’re sure you need to get 14,320 then you may need to get clarification of the calculation needed or revise that number. enter image description here

Additionally, your values may be wrong. You can get 14, 320 if the values for the 2nd and 3rd rows in the second column was -1 and 1 respectively.enter image description here

3

solved multiply and SUM() MS SQL