select SUM (Bill) from ProductSaleReport group by PCI
having MONTH(Date) between 1 and 3
Could any one please help me finding the issue.?
I am getting the errors:
Msg 8121, Level 16, State 1, Line 1
Column 'ProductSaleReport.Date' is invalid in the HAVING clause because it is not contained in either an aggregate function or the GROUP BY clause.
Msg 8121, Level 16, State 1, Line 1
Column 'ProductSaleReport.Date' is invalid in the HAVING clause because it is not contained in either an aggregate function or the GROUP BY clause.