牛客987852806号
牛客987852806号
全部文章
分类
题解(45)
归档
标签
去牛客网
登录
/
注册
牛客987852806号的博客
全部文章
(共163篇)
题解 | 统计加班员工占比
select sb.department, concat( round( ( count(distinct case when timestampdiff(second,first_clockin,last_clockin)/3600>9.5 then sb.staff_id end)/c...
2025-02-18
0
42
题解 | 查询单日多次下订单的用户信息?
with tiaojian as ( select t.order_date, t.user_id, order_nums from( select date(order_time) as order_date, user_id, count(order_id) as order_nums, d...
2025-02-18
0
63
题解 | 统计用户获得积分
select user_id, floor(sum(timestampdiff(minute,visit_time,leave_time))/10)*1 as point from visit_tb group by user_id order by point desc
2025-02-17
1
43
题解 | 统计员工薪资扣除比例
select sb.staff_id, sb.staff_name, concat( round( ( sum(dock_salary)/sum(normal_salary))*100,1),"%") as dock_ratio from staff_tb sb inner j...
2025-02-17
0
48
题解 | #10月的新户客单价和获客成本#
with tiaojian as ( select uid, order_id, total_amount from( select uid, order_id, total_amount, date_format(event_time,"%Y%m") as month, d...
2024-10-18
0
66
题解 | #连续签到领金币#
with tiaojian as ( select uid, date(in_time) as pday from tb_user_log where artical_id=0 and sign_in=1 and date(in_time) between "2021-07-07&q...
2024-10-17
0
46
题解 | #计算用户的平均次日留存率#
#1.一个人多次留存也算,比如用户 user_id=1001,date=12 13 14 这种算2次。 #2.计算公式是每人每天的总和,比如user_id=1001,date 12 and user_id=1001,date 13 这算2天(user_id=1002,date=12,这种应该算3天)...
2024-09-26
0
92
题解 | #每篇文章同一时刻最大在看人数#
with tiaojian as ( select artical_id,in_time as ptime from tb_user_log where artical_id<>0 union select artical_id,out_time as ptime from tb_us...
2024-09-26
0
103
题解 | #平均活跃天数和月活人数#
这个比较好看。 select date_format(start_time,"%Y%m"), round( count(distinct date(submit_time),uid)/count(distinct case when score is not null then...
2024-08-26
0
114
题解 | #实习广场投递简历分析(三)#
with tiaojian as ( select job, date_format(date,"%Y-%m") as month, sum(num) as py from resume_info group by job,date_format(date,"%Y-%...
2024-08-23
0
101
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页