题解 | #牛客的课程订单分析(六)#

牛客的课程订单分析(六)

http://www.nowcoder.com/practice/c5736983c322483e9f269dd23bdf2f6f

select
a.id
,a.is_group_buy
,c.name
from (
select
*
from order_info
where user_id in (
select
user_id
from order_info
where date > '2025-10-15'
and status = 'completed'
and product_name in ('C++','Python','Java')
group by user_id
having count(user_id) >=2
ORDER by user_id
)
and date > '2025-10-15'
and status = 'completed'
and product_name in ('C++','Python','Java')
order by id
) a
left join client c
on a.client_id = c.id
order by a.id

全部评论

相关推荐

讲原则的小黄鸭不愿吃...:小米不缺人的感觉,而且清华✌️肯定oq了,小米薪资待遇开得一般,知道给了offer你可能也不会去,就不浪费人力面你了
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务