烛少
烛少
全部文章
分类
题解(53)
归档
标签
去牛客网
登录
/
注册
烛少的博客
全部文章
(共68篇)
题解 | #查找在职员工自入职以来的薪水涨幅情况#
# select c.emp_no,salary2-salary1 as growth # from # (select a1.emp_no,b1.salary salary1 # from employees a1 # join salaries b1 # on a1.emp_no=b1.emp_...
2024-11-19
0
55
题解 | #查询连续登陆的用户#
select user_id from( select user_id, count(in_day-in_rank) from( select a.user_id,day(log_time) in_day, row_number() over(partition by user_id order b...
2024-11-17
0
51
题解 | #统计各岗位员工平均工作时长#
SELECT post ,round(avg(TIMESTAMPDIFF(second, first_clockin,last_clockin)/3600),3) as work_hours FROM staff_tb a JOIN attendent_tb b ON a.staff...
2024-11-17
0
52
题解 | #每个商品的销售总额#
# select product_name,total_sales, # row_number() over(partition by category order by total_sales desc) category_rank # from ( # select name product_...
2024-11-17
0
42
题解 | #每个商品的销售总额#
select product_name,total_sales, row_number() over(partition by category order by total_sales desc) category_rank from ( select name product_name,cat...
2024-11-17
0
43
题解 | #推荐内容准确的用户平均评分#
select avg(distinct score) avg_score from user_action_tb a join recommend_tb b on a.user_id=b.rec_user where a.hobby_l=b.rec_info_l
2024-11-17
1
50
题解 | #统计所有课程参加培训人次#
select sum(case when length(course)=7 then 1 when length(course)=15 then 2 when length(course)=23 then 3 else 0 end) staff_nums from cultivate_tb
2024-11-17
37
63
题解 | #查询连续入住多晚的客户信息?#
select a.user_id,a.room_id,b.room_type,datediff(date(checkout_time),date(checkin_time)) days from checkin_tb a left join guestroom_tb b on a.room_id=b...
2024-11-17
0
47
题解 | #查询连续入住多晚的客户信息?#
select a.user_id,a.room_id,b.room_type,datediff(date(checkout_time),date(checkin_time)) days from checkin_tb a left join guestroom_tb b on a.room_id=b...
2024-11-17
0
56
题解 | #分析客户逾期情况#
select pay_ability,concat(round(count(overdue_days)/count(*)*100,1),'%') overdue_ratio from loan_tb a left join customer_tb b on a.customer_id=b.custo...
2024-11-17
0
60
首页
上一页
1
2
3
4
5
6
7
下一页
末页