爱莉很担心你
爱莉很担心你
全部文章
分类
归档
标签
去牛客网
登录
/
注册
爱莉很担心你的博客
全部文章
(共9篇)
最简单的一集
select source, count(1) cnt from (select ifnull(name, 'GroupBuy') source, count(product_name) over (partition by user_id) rk from order_info o ...
2024-11-06
0
30
直接使用avg计算逾期率
select pay_ability, concat(round(avg(if(overdue_days is null, 0, 1)) * 100, 1), '%') overdue_ratio from customer_tb c join loan_tb lt on...
2024-10-24
17
41
最简单的一集
with b as (select day(fdate), user_id, day(fdate) - row_number() over (partition by user_id order by fdate) diff from tb_dau whe...
2024-10-24
0
45
题解 | #异常的邮件概率#
select date, round(1 - avg(if (type = 'completed', 1, 0)), 3) P from email e join user u1 on e.send_id = u1.id join user u2 on e.r...
2024-08-27
0
183
题解 | #统计复旦用户8月练题情况#
select c1.device_id, c1.university, sum(qt), sum(rt) from ( select *, case when mo...
2024-07-26
0
91
题解 | #浙大不同难度题目的正确率#
select d.difficult_level, avg(r1) correct_rate from ( select a.device_id, c.difficult_level, b...
2024-07-26
0
111
题解 | #用分位数分析牛客网用户活动#
import pandas as pd f=pd.read_csv('Nowcoder.csv',sep=',') pd.set_option('display.width',300) pd.set_option('display.max_rows',None) pd.set_option('dis...
2024-04-22
0
101
题解 | #牛客的资深员工#
import pandas as pd f=pd.read_csv('Nowcoder.csv',sep=',',dtype={'working_years':int}) f=f.loc[f.working_years.apply(lambda x:x>=8)] f=f[f['language...
2024-04-17
0
125
题解 | #记录喜好的字典#
key_niuniu={'NiuNiu':'Java','NiuMei':'Python','Niukele':'CPP','NiuNeng':'Python','Tony':'Java','Anna':'CPP','Allen':'CPP'} def get_key(val): lst=[...
2024-03-18
0
169