分组统计BUG 返回

反馈
4 1374

生成的SQL如下

SELECT  `shopname` AS `shopname` , `productname` AS `productname` , CAST( concat( Year(`deliverydate`) ,'-', Month(`deliverydate`) ,'-', Day(`deliverydate`) )  AS DATETIME) AS `deliverydate` , COUNT(`id`) AS `count`  FROM `card_consume` GROUP BY `shopname`,`productname`,`deliverydate`, CAST( concat( Year(Result) ,'-', Month(Result) ,'-', Day(Result) )  AS DATETIME) 

这个SQL错误,group字段不对CAST( concat( Year(Result) ,'-', Month(Result) ,'-', Day(Result) )

热忱回答4

版块

学习文档

最新会员

发布达人

回贴达人