coding的佩奇酱
coding的佩奇酱
全部文章
分类
归档
标签
去牛客网
登录
/
注册
coding的佩奇酱的博客
全部文章
(共25篇)
题解 | 统计所有课程参加培训人次
select round(sum(length(replace(coalesce(course,0),',','')) / 7),0) as staff_nums from cultivate_tb;
2026-02-06
0
23
题解 | 分析客户逾期情况
with tmp as (select t1.customer_id, t1.pay_ability, case when overdue_days is null then 0 else 1 end as num, count(1) over(partition by pay_ability) ...
2026-02-03
0
21
题解 | 最长连续登录天数
select user_id, max(maxrn) as max_consec_days from (select user_id, datediff ,count(datediff) as maxrn from (select fdate, user_id, fdate - rn as da...
2026-02-02
0
34
题解 | 用列表实现队列
queue = [1, 2, 3, 4, 5] i=0 n=int(input()) while i<=1: queue.pop(0) print(queue) i+=1 queue.append(n) print(queue)
2026-01-31
0
25
题解 | 每个月Top3的周杰伦歌曲
select * from (select month, row_number() over(partition by month order by play_pv desc,song_id asc) as ranking, song_name, play_pv from (with tmp as ...
2026-01-22
0
31
题解 | 基本数学函数
select id, value, case when value >= 0 then value when value < 0 then value *-1 end as absolute_value, ceil(value) as ceiling_value, ...
2026-01-14
0
25
题解 | 电话号码格式校验
select id, name, phone_number from contacts where (length(phone_number) = 10 or length(replace(phone_number,'-','')) = 10) and substring(phone_number,...
2026-01-14
0
33
题解 | #平均工资#
select avg(salary) from salaries where salary != (select max(salary) from salaries where to_date = '9999-01-01') and salary != (select min(salary) fr...
2023-08-31
0
259
题解 | #牛客的课程订单分析(五)#
select t3.user_id, t3.first_buy_date, tc.second_buy_date, t3.cnt from (select * from (select user_id, case when rn = 1 then date else null end as fir...
2023-08-29
0
390
题解 | #牛客的课程订单分析(六)#
select id,is_group_buy,name from (select id,is_group_buy,name,max(rn) over(partition by user_id) mx from ( select t1.id, t1.user_id, t1.is_group_buy...
2023-08-24
0
316
首页
上一页
1
2
3
下一页
末页