I believe using "GROUP BY region, date" will group by month(date) using the
alias "date"
> I want to create a summary table aggregating the sales based on the
> month and region. But in my base table, there is only a date field,
> I have to use month(date) to get the month, but I can't use
> "group by region, month(date)" to create the summary table.
>
> My SQL looks like:
>
> insert into sum_mon_reg
> select region,
> sum(sales) sum_sales,
> month(date) date
> from sales
> group by region, month(date)>