错误信息说明:
1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'haha_db.staff.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
注意在执行上述语句后需要重新连接数据库
说明:group by 默认显示的是每一组找到的第一条信息
来源: https://www.cnblogs.com/leihaha/p/8192183.html