why do we need to sort the dates using the between function? can we directly do group by date without adding the where clause to sort the dates because the output is the same in both the situations.