想请问下,在方法二中用窗口函数生成的那个表里,除了多了一个number列外其他信息都与答案一致,为什么在做为被查询表后不加任何条件的情况下查询的结果不一样呢?就是这样: select t1.id, t1.user_id,t1.product_name,t1.status,t1.client_id,t1.date from ( select *,count(id) over(partition by user_id) as number from order_info where datediff(date,"2025-10-15")>0 and status ="completed" and product_name in ("C++","Java","Python") ) t1 order by t1.id
点赞

相关推荐

牛客网
牛客企业服务