玉树叶
玉树叶
全部文章
分类
未归档(1)
题解(71)
归档
标签
去牛客网
登录
/
注册
玉树叶的博客
TA的专栏
42篇文章
0人订阅
一天一个Mysql
42篇文章
2861人学习
全部文章
(共66篇)
题解 | #统计2021年10月每个退货率不大于0.5的商品各项指标#
来自专栏
通过代码 SELECT product_id, round(IFNULL(clicks / shows,0),3) ctr, round(IFNULL(buycar / clicks,0),3) cart_rate, round(IFNULL(givemoney / ...
Mysql
2021-12-24
0
379
题解 | #计算商城中2021年每月的GMV#
来自专栏
这,,,没啥说的啊 select date_format(event_time,"%Y-%m") as month, sum(if(status = 2,0,total_amount)) as GMV from tb_order_overall where year(event_t...
Mysql
2021-12-23
0
335
题解 | #连续签到领金币#
来自专栏
通过代码 select uid, date_format(time, '%Y%m') month, sum(coins) coin from (select uid, time, (case...
Mysql
2021-12-22
0
531
题解 | #每天的日活数及新用户占比#
来自专栏
通过代码 SELECT dt, tot dau, round((ifnull(new,0))/ tot,2) uv_new_ratio FROM(SELECT count(uid) new, inttime FROM(SELECT...
Mysql
2021-12-21
0
441
题解 | #统计活跃间隔对用户分级结果#
来自专栏
通过代码 select user_grade, round(count(uid) / tot,2) ratio from (select uid, tot, (case when datediff(now,intime) > 6 and date...
Mysql
2021-12-20
8
972
题解 | #2021年11月每天新用户的次日留存率#
来自专栏
通过代码 select a.dt, round(count(distinct b.uid)/count(a.uid),2) uv_left_rate from (select uid, min(date(in_tim...
Mysql
2021-12-19
0
643
题解 | #每篇文章同一时刻最大在看人数#
来自专栏
没通过代码 select artical_id, max(max_uv) max_uv from ( select artical_id, sum(in_num) over ( partition...
Mysql
2021-12-18
0
393
题解 | #2021年11月每天的人均浏览文章时长#
来自专栏
select date(out_time), round( sum(timestampdiff(second,in_time,out_time)) / count(distinct uid),1) time from tb_user_log wher...
Mysql
2021-12-17
0
419
题解 | #近一个月发布的视频中热度最高的top3视频#
来自专栏
通过代码 DATE_SUBselect video_id, round((100 * avg_rate + 5 * likes + 3 * comments + 2 * retweets) * (1 / (end_time + 1)), 0) hot_index from (SELEC...
Mysql
2021-12-16
0
454
题解 | #国庆期间每类视频点赞量和转发量#
来自专栏
通过代码 select tag, dates dt, like1 sum_like_cnt_7d, max_retweet max_retweet_cnt_7d from ( SELECT tag, date(start_time) dat...
Mysql
2021-12-15
6
962
首页
上一页
1
2
3
4
5
6
7
下一页
末页