CARLJOSEPHLEE
CARLJOSEPHLEE
全部文章
分类
题解(26)
归档
标签
去牛客网
登录
/
注册
CARLJOSEPHLEE的博客
全部文章
(共216篇)
题解 | 提取博客URL中的用户名
SELECT device_id,SUBSTRING_INDEX(blog_url,"/",-1) user_name FROM user_submit
2025-07-21
0
23
题解 | 计算用户的平均次日留存率
不会写,抄答案了qwq@烤点老白薯(637174235)这题好难不会写[牛泪] SELECT COUNT(distinct q2.device_id,q2.date)/count(DISTINCT q1.device_id,q1.date) as avg_ret from question_prac...
2025-07-21
1
141
题解 | 计算用户8月每天的练题数量
select day(date) as day,count(1) question_cnt from question_practice_detail where date >= '2021-08-01' and date < '2021-09-01' group by day
2025-07-21
0
22
题解 | 查看不同年龄段的用户明细
select device_id,gender, (case when age < 20 then '20岁以下' when age>=20 and age<= 24 then '20-24岁' when age>= 25 then '25岁及以上' else '其他' en...
2025-07-21
0
31
题解 | 计算25岁以上和以下的用户数量
select (case when age is null then '25岁以下' when age < 25 then '25岁以下' else '25岁及以上' end) age_cut,count(*) number from user_profile group by age_cut
2025-07-21
0
25
题解 | 查找山东大学或者性别为男生的信息
select device_id,gender,age,gpa from user_profile where university = '山东大学' union all select device_id,gender,age,gpa from user_profile where gender =...
2025-07-21
0
23
题解 | 统计每个用户的平均刷题数
select up.university,qd.difficult_level, round(count(qd.question_id)/count(distinct qpd.device_id),4)avg_answer_cnt from (select * from user_profile w...
2025-07-21
0
31
题解 | 统计每个学校各难度的用户平均刷题数
select up.university,qd.difficult_level, round(count(qd.question_id)/count(distinct qpd.device_id),4)avg_answer_cnt from user_profile up join question...
2025-07-21
0
25
题解 | 基本数学函数
select id,value,abs(value) absolute_value,ceil(value) ceiling_value,floor(value) floor_value,round(value,1) rounded_value from numbers
2025-07-21
0
22
题解 | 纠错4
做完了SQL必知必会:)@烤点老白薯(637174235) SELECT cust_name, cust_contact, cust_email FROM Customers WHERE cust_state = 'MI' UNION SELECT cust_name, cust_conta...
2025-07-21
1
29
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页