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

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

http://www.nowcoder.com/practice/348afda488554ceb922efd2f3effc427

select d.user_id as id,d.date as d1,c.date as d2,d.count as count from ( select a.user_id as user_id,min(b.date) as date,a.count from ( select user_id,min(date)as date,count(user_id)as count from order_info where product_name in ('C++','Python','Java') and status='completed' and date>'2025-10-15' group by(user_id) having count('user_id')>=2 order by user_id )as a left join order_info as b on a.user_id=b.user_id where b.date>a.date and b.date>'2025-10-15' and b.status='completed' group by a.user_id order by b.date asc )as c left join ( select user_id,min(date)as date,count(user_id)as count from order_info where product_name in ('C++','Python','Java') and status='completed' and date>'2025-10-15' group by(user_id) having count('user_id')>=2 order by user_id )as d on c.user_id=d.user_id order by d.user_id asc 只要有思路就能写出来。

全部评论

相关推荐

能干的三文鱼刷了10...:公司可能有弄嵌入式需要会画pcb的需求,而且pcb能快速直观看出一个人某方面的实力。看看是否有面试资格。问你问题也能ai出来,pcb这东西能作假概率不高
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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