题解 | #对顾客ID和日期排序#
对顾客ID和日期排序
https://www.nowcoder.com/practice/fa4eb4880d124a4ead7a9b025fe75b70
select
cust_id,
order_num
from
(
select
cust_id,
order_num,
rank() over(
partition by cust_id
order by
order_date desc
)
from
Orders
) as j