会编程的发呆爱好者加麻加辣
会编程的发呆爱好者加麻加辣
全部文章
分类
归档
标签
去牛客网
登录
/
注册
会编程的发呆爱好者加麻加辣的博客
全部文章
(共208篇)
题解 | 每篇文章同一时刻最大在看人数
with a as( select uid,artical_id,in_time as dt, 1 as flag from tb_user_log where artical_id !=0 union select uid,artical_id,out_time as dt, -1 as fla...
2025-05-23
0
30
题解 | 统计活跃间隔对用户分级结果
with a as( select uid,artical_id,date(in_time) as dt from tb_user_log union select uid,artical_id,date(out_time) as dt from tb_user_log), b as ( ...
2025-05-22
0
26
题解 | 连续签到领金币
select uid,date_format(intime,'%Y%m') as month,sum(coin) as coin from( select uid,intime , (case when cnt%7=3 then 3 when cnt%7=0 then 7 else 1 end) a...
2025-05-21
0
20
题解 | 有取消订单记录的司机平均评分
select ifnull(driver_id,'总体'), round(avg(grade),1) as avg_grade from tb_get_car_order where driver_id in (select driver_id from tb_get_car_order wher...
2025-05-20
0
28
题解 | 根据指定记录是否存在输出不同情况
select ui.uid,count(if(submit_time is null and start_time is not null,1,null)) as incomplete_cnt, round(ifnull(count(if(submit_time is null,1,null))/c...
2025-05-20
0
21
题解 | 大小写混乱时的筛选统计
#筛选出试卷作答数小于3的类别tag with a as( select tag, count(er.exam_id) as cnt from examination_info ei join exam_record er on ei.exam_id = er.exam_id group by t...
2025-05-19
0
22
题解 | 对过长的昵称截取处理
select uid, if(char_length(nick_name)>13,concat(substr(nick_name,1,10),'...'),nick_name) as nick_name from user_info where char_length(nick_name)&g...
2025-05-19
0
21
题解 | 注册当天就完成了试卷的名单第三页
#取求职方向为算法工程师,且注册当天就完成了算法类试卷的人 with a as( select distinct ui.uid,level,register_time from user_info ui left join exam_record er on ui.uid=er.uid righ...
2025-05-18
0
27
题解 | 各用户等级的不同得分表现占比
with a as (select level,score, (case when score >=90 then '优' when score>=75 then '良' when score>=60 then '中' else '差' end) as score_grade fr...
2025-05-18
0
25
题解 | 根据指定记录是否存在输出不同情况
select ui.uid, count(if(start_time is not null and score is null,1,null)) as incomplete_cnt, round(avg(if(start_time is not null and score is null,1,0...
2025-05-12
0
30
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页