题解 | #牛客的课程订单分析(六)#
牛客的课程订单分析(六)
https://www.nowcoder.com/practice/c5736983c322483e9f269dd23bdf2f6f?tpId=82&tags=&title=&difficulty=0&judgeStatus=0&rp=1&sourceUrl=%2Fexam%2Foj%3Fpage%3D2%26tab%3DSQL%25E7%25AF%2587%26topicId%3D82
left join+count窗口函数
select id,is_group_buy,client_name from
(select o.id id,is_group_buy,name client_name,count(o.id)over(partition by user_id) co
from order_info o left join client c on o.client_id=c.id where date>'2025-10-15' and status='completed'
and product_name in('C++','Java','Python'))t1 where co>1
order by id
SQL题解 文章被收录于专栏
主要是为自己做个笔记