Bug #PSCFV-5626 - Amended SQL query to sum totals for each day