题解 | #纠错3#

纠错3

http://www.nowcoder.com/practice/3870c9bca7a4406f899af3e903b8bf51

SELECT order_num, COUNT(order_num) AS items FROM OrderItems GROUP BY order_num HAVING items >= 3 ORDER BY items

这道题需要获取到order_num(订单号)的次数,找到次数大于3的,需要对order_num进行计数,然后对订单号进行分组,然后获取到次数大于3的订单数,再对次数进行排序

全部评论

相关推荐

CrazyBucket:我今天下午也做梦在招聘会上面试一家小厂,给自己气笑了
点赞 评论 收藏
分享
点赞 收藏 评论
分享
牛客网
牛客企业服务