0 点赞 评论 收藏
分享
2022-03-05 19:27
华南农业大学 golang JasonViogd:请问一下,为何我将item_price * 移到sum函数外部就会报错运行不了,就像下面这个样子 SELECT order_num, item_price *SUM(quantity) total_price FROM OrderItems GROUP BY order_num HAVING total_price >= 1000 ORDER BY order_num; 报错如下 SQL_ERROR_INFO: "Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'OrderItems.item_price' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by"
0 点赞 评论 收藏
分享
关注他的用户也关注了: