题解 | 每天登陆最早的用户的内容喜好
每天登陆最早的用户的内容喜好
https://www.nowcoder.com/practice/24bb13a28267486ba86c1d21459fa90a
with t1 as
(
SELECT
rank() over(partition by date(lb.log_time) order by lb.log_time) as paiming
,user_id,date(lb.log_time) as log_day,lb.log_time
from login_tb as lb
)
select t1.log_day, t1.user_id,uab.hobby from t1
left join user_action_tb as uab
on t1.user_id=uab.user_id
where t1.paiming=1
order by t1.log_day asc;
