题解 | 每天登陆最早的用户的内容喜好

每天登陆最早的用户的内容喜好

https://www.nowcoder.com/practice/24bb13a28267486ba86c1d21459fa90a

with min_tb as(
    select min(log_time) as mintime,
    date(log_time) as log_day
    from login_tb
    group by date(log_time)
),
e_user as(
    select log_day,user_id
    from min_tb join login_tb on min_tb.log_day=date(login_tb.log_time)
    where mintime=log_time
)
select log_day,user_id,hobby
from e_user join user_action_tb using(user_id)
order by log_day,user_id;

全部评论

相关推荐

林后润:听说他们有kpi,要到了简历编号就不理人了
27届求职交流
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务