这一题看评论区有窗口函数的做法,代码如下select distinct user_id, last_value(date) over(partition by user_id order by date rows between current row and unbounded following) as d from login; last_value ,取最后一条记录rows between current row and unbounded following:窗口帧,rows betwee...