I am trying to run a simple sum query as stated below but it is giving me different results sometimes. I googled this problem but wasn't able to find it so I am putting it here. Is this a common behaviour, if so then is there a way to avoid it since we are a financial institute and accuracy of metrics is key for us. After successive trails and putting the results in excel we noticed that the delta between any of the results is always multiple of 4 and 32.
select sum(loanAmount), grade from loans group by grade;