select SUM (Bill) from ProductSaleReport group by PCI
having MONTH(Date) between 1 and 3
请问有人能帮我找到问题吗?
我收到以下错误信息:
Msg 8121, Level 16, State 1, Line 1
因为它既不包含聚合函数也不在GROUP BY子句中,所以“ProductSaleReport.Date”列在HAVING子句中无效。
Msg 8121, Level 16, State 1, Line 1
因为它既不包含聚合函数也不在GROUP BY子句中,所以“ProductSaleReport.Date”列在HAVING子句中无效。