牛客987852806号
牛客987852806号
全部文章
分类
题解(45)
归档
标签
去牛客网
登录
/
注册
牛客987852806号的博客
全部文章
(共166篇)
题解 | 用户购买次数前三
select uid, cnt from( select uid, count(distinct trace_id) as cnt, row_number()over(order by count(distinct trace_id) desc,uid) as pdiff from user_cl...
2025-02-21
1
79
题解 | 下单最多的商品
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
101
题解 | 完成员工考核试卷突出的非领导员工
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
87
题解 | 统计加班员工占比
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
79
题解 | 查询单日多次下订单的用户信息?
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
97
题解 | 统计用户获得积分
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
69
题解 | 统计员工薪资扣除比例
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
90
题解 | #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
95
题解 | #连续签到领金币#
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
59
题解 | #计算用户的平均次日留存率#
#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
115
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页