Changed sum_stat to use a date range