题解 | #牛客每个人最近的登录日期(三)#

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

https://www.nowcoder.com/practice/16d41af206cd4066a06a3a0aa585ad3d

select round(count(user_id)/(select count(distinct user_id) from login),3)
from login
where (user_id,date) in (select user_id, date_add(min(date), interval 1 day)
from login
group by user_id
)

用 if 函数无法求解 sum( if(date_add(min(date), interval 1 day) in date,1,0)) 算不出来为什么,只是因为in的用法错误吗,求解

全部评论

相关推荐

哞客37422655...:你猜为什么福利这么好还得一直追着你问
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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