group by 和 select

group by 有一个原则,就是 select 后面的所有列中,没有使用聚合函数的列,必须出现在 group by 后面。

原文地址:https://www.cnblogs.com/matengfei123/p/6858606.html