题解 | #每天的日活数及新用户占比#

每天的日活数及新用户占比

https://www.nowcoder.com/practice/dbbc9b03794a48f6b34f1131b1a903eb

select date,any_value(active_cnt) dau
,round(count(distinct uid)/any_value(active_cnt),2) uv_new_ratio from 
(
select min(date(in_time)) min_date ,uid
from tb_user_log
group by uid
) a right join 
(
select date,count(distinct uid) active_cnt
from (
select date(out_time) date,uid
from tb_user_log
union
select date(in_time) date,uid
from tb_user_log) s1
group by date
) b
on a.min_date = b.date
group by date
order by date;

全部评论

相关推荐

AAA专业长城贴瓷砖刘大爷:这样的简历我会直接丢进垃圾桶,花里胡哨的
点赞 评论 收藏
分享
05-12 11:09
已编辑
门头沟学院 后端
已注销:没必要放这么多专业技能的描述。这些应该是默认已会的,写这么多行感觉在凑内容。项目这块感觉再包装包装吧,换个名字,虽然大家的项目基本都是网上套壳的,但是你这也太明显了。放一个业务项目,再放一个技术项目。技术项目,例如中间件的一些扩展和尝试。
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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