这道题我是这样写的,使用row_number对每个用户的登录日期进行排序,然后取出第一条数据就是最近一次登录~ select a1.u_n, a1.c_n, a1.date from (select u.name as u_n ,c.name as c_n ,l.date as date ,row_number() over(partition by u.id order by date desc ) as num from user u, client c, login l where u.id = l.user_id and c.id = l.clie...