MySQL报错1055- Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated colum
1.问题描述今天在写SQL语句时,需要将数据先按用户分组汇总,再按物品类型(测试数据库中字段是item_name)进行分组汇总,SQL语句中使用了groupby分组函数,然后执行SQL报错:执行的SQL语句:SELECTa.user_id,a.item_name,a.item_id,a.approver_id,a.create_time,a.supposed_return_timeFROM`t_a