日期:2014-05-17  浏览次数:20975 次

该列没有包含在聚合函数或 GROUP BY 子句中
该列没有包含在聚合函数或 GROUP BY 子句中是怎么回事???

------解决方案--------------------
使用了group by,所有select的列必须是group by的列,或者聚合列,所谓聚合列,就是使用max min sum avg count等等汇总的列。
------解决方案--------------------
引用:
使用了group by,所有select的列必须是group by的列,或者聚合列,所谓聚合列,就是使用max min sum avg count等等汇总的列。

是的。
大概如下
你的问题是  select xx,xxx, from table group by xx,xxx,xxxx
需要        select xx,xxx,xxxx from table group by xx,xxx,xxxx