请问一下,为何我将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"
2

相关推荐

不愿透露姓名的神秘牛友
10-12 10:48
已编辑
秋招之苟:邻居家老哥19届双2硕大厂开发offer拿遍了,前几天向他请教秋招,他给我看他当年的简历,0实习实验室项目技术栈跟开发基本不沾边😂,我跟他说这个放在现在中厂简历都过不了
点赞 评论 收藏
分享
牛客网
牛客企业服务