会编程的发呆爱好者加麻加辣
会编程的发呆爱好者加麻加辣
全部文章
分类
归档
标签
去牛客网
登录
/
注册
会编程的发呆爱好者加麻加辣的博客
全部文章
(共208篇)
题解 | 每天登陆最早的用户的内容喜好
select log_day,user_id,hobby from( select u.user_id,u.hobby, substr(l.log_time,1,10) as log_day,rank() over(partition by substr(l.log_time,1,1...
2025-04-08
0
21
题解 | 统计加班员工占比
select s.department, concat(round(count(case when timestampdiff(minute,a.first_clockin,a.last_clockin)/60>9.5 then 1 else null end)/count(s.staff_...
2025-04-08
0
25
题解 | 统计各个部门平均薪资
select s.department,round(avg(sa.normal_salary-sa.dock_salary),3) as avg_salary from staff_tb s join salary_tb sa on s.staff_id = sa.staff_id where sa...
2025-04-08
0
24
题解 | 查询单日多次下订单的用户信息?
select substr(o.order_time,1,10) as order_date,o.user_id, count(o.order_time) as order_nums,u.vip from order_tb o join uservip_tb u on o.user_id = u....
2025-04-07
0
23
题解 | 更新用户积分信息?
select a.user_id, a.total+a.point as point from( select o.user_id,sum(o.order_price) as total,u.point from order_tb o join uservip_tb u on o.user_id...
2025-04-07
0
33
题解 | 统计用户获得积分
select user_id, sum(case when TIMESTAMPDIFF(MINUTE,visit_time,leave_time)>=10 then floor(TIMESTAMPDIFF(MINUTE,visit_time,leave_time)/10) else 0 e...
2025-04-07
0
27
题解 | 统计员工薪资扣除比例
select s.staff_id,s.staff_name, concat(round(sa.dock_salary/sa.normal_salary*100,1),'%') as dock_ratio from staff_tb s join salary_tb sa on s.staff_id...
2025-04-07
0
30
题解 | 统计用户从访问到下单的转化率
select date(v.visit_time) as date, CONCAT(round(count(distinct o.user_id)/count(distinct v.user_id) * 100, 1), '%') as cr from order_tb o right join ...
2025-04-05
0
25
题解 | 查询下订单用户访问次数?
select v.user_id, count(distinct v.visit_time) as visit_nums from (select user_id from order_tb where substr(order_time,1,10) = '2022-09-02')a join v...
2025-04-05
0
22
题解 | 统计各等级会员用户下订单总额
select u.vip, COALESCE(sum(o.order_price),0) as order_total from order_tb o right join uservip_tb u on o.user_id = u.user_id group by u.vip order by o...
2025-04-04
0
39
首页
上一页
8
9
10
11
12
13
14
15
16
17
下一页
末页