在小红书看到一种解法,非常易懂 step 1: 先找到当前时间:-- date((select max(in_time) from tb_user_log))指的是当前时间 step 2:用case when对四种用户类型进行分层 case when datediff(date((select max(in_time) from tb_user_log)) ,date(min(in_time)))<=7 then '新晋用户' -- 这里的date(min(in_time)指的是这个新用...