题解 |建立子表,用普通方法查询(无需表连接)

牛客每个人最近的登录日期(二)

http://www.nowcoder.com/practice/7cc3c814329546e89e71bb45c805c9ad

select u.name as u_n ,c.name as c_n ,a.date
from
(select user_id, max(date) as date,client_id
from login group by user_id order by user_id) a,user as u, client c
where a.user_id = u.id
and a.client_id = c.id
order by u.name
建立子表,用普通方法查询(无需表连接)

全部评论

相关推荐

小浪_Coding:个人技能一条测试没有
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务