牛客987852806号
牛客987852806号
全部文章
分类
题解(45)
归档
标签
去牛客网
登录
/
注册
牛客987852806号的博客
全部文章
(共166篇)
题解 | #每篇文章同一时刻最大在看人数#
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
123
题解 | #平均活跃天数和月活人数#
这个比较好看。 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
145
题解 | #实习广场投递简历分析(三)#
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
118
题解 | #查询培训指定课程的员工信息#
select sb.staff_id, sb.staff_name from staff_tb sb inner join cultivate_tb cb on sb.staff_id=cb.staff_id where course like "%course3%"
2024-08-22
0
149
题解 | #推荐内容准确的用户平均评分#
with tiaojian as ( select distinct ub.user_id, score from recommend_tb tb inner join user_action_tb ub on tb.rec_user=ub.user_id and rec_info_l=hobb...
2024-08-22
0
172
题解 | #统计各岗位员工平均工作时长#
select post, avg(timestampdiff(second,first_clockin,last_clockin))/3600 as work_hours from staff_tb sb inner join attendent_tb ab on sb.staff_id=ab....
2024-08-22
0
148
题解 | #查询连续登陆的用户#
with tiaojian as ( select tb.user_id, date(log_time) as pw, row_number()over(partition by tb.user_id order by date(log_time) asc ) as pn from regist...
2024-08-22
0
150
题解 | #统计所有课程参加培训人次#
select sum(t.pn) as staff_nums from( select (LENGTH(course) - LENGTH(REPLACE(course, ',', '')))+1 as pn from cultivate_tb ) as t
2024-08-21
0
148
题解 | #查询连续入住多晚的客户信息?#
这题比较容易,就是难在排序了,需要多注意 with tiaojian as ( select user_id, cb.room_id, room_type, sum(datediff(checkout_time,checkin_time)) as pdiff from checkin_tb cb ...
2024-08-21
0
144
题解 | #获取指定客户每月的消费额#
with tiaojian as ( select date_format(t_time,"%Y-%m") as time, t_cus, sum(t_amount) as total from trade where t_type=1 and year(t_time)=2023...
2024-08-21
0
148
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页