Every time a user upgrades to the paid membership a new row is inserted into the payments table. A monthly membership is $5.00, however, after fees from paypal, I actually get $4.55. The following query is correctly adding up all of the $5.00 payments but, of course, it's not really the dollar amount I end up with. What is the best way to tweak this query so that it takes $.45 off each payment before adding them all up?
SELECT sum(amount) as total FROM payments WHERE YEAR(payDate) = YEAR(CURDATE()) AND MONTH(payDate) = MONTH(CURDATE()) and uID in (select uID from users where subscription = 'Silver')