牛客987852806号
牛客987852806号
全部文章
分类
题解(45)
归档
标签
去牛客网
登录
/
注册
牛客987852806号的博客
全部文章
(共175篇)
题解 | 下单最多的商品
select t1.product_id, pdiff as cnt from( select product_id, pdiff, dense_rank()over(order by pdiff desc,product_id asc) as py from( select product_...
2025-02-20
0
120
题解 | 完成员工考核试卷突出的非领导员工
with tiaojian as ( select ed.emp_id, eo.exam_id, emp_level, eo.tag, ed.score, timestampdiff(minute,start_time,submit_time) as pt, avg(score)over(part...
2025-02-20
0
99
题解 | 统计加班员工占比
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
86
题解 | 查询单日多次下订单的用户信息?
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
103
题解 | 统计用户获得积分
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
74
题解 | 统计员工薪资扣除比例
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
102
题解 | #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
104
题解 | #连续签到领金币#
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
64
题解 | #计算用户的平均次日留存率#
#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
124
题解 | #每篇文章同一时刻最大在看人数#
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
131
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页