fixed sql query for payments (date)