Fixed SQL on expense summation.