GB279824
GB279824
全部文章
分类
归档
标签
去牛客网
登录
/
注册
GB279824的博客
全部文章
(共190篇)
题解 | 统计复旦用户8月练题情况
# select u.device_id, u.university, # count(q.question_id) as question_cnt, # sum(case when q.result = 'right' then 1 else 0 end) as right_que...
2025-05-17
0
43
题解 | 找出每个学校GPA最低的同学
select device_id, university, gpa from user_profile where (university, gpa) in( select university, min(gpa) as gpa from user_profile group...
2025-05-17
0
29
题解 | 截取出年龄
select substring_index(substring_index(profile,',',3),',',-1) as age, count(device_id) as number from user_submit group by age
2025-05-17
0
34
题解 | 提取博客URL中的用户名
select device_id, substring_index(blog_url,'/',-1) from user_submit
2025-05-17
0
37
题解 | 统计每种性别的人数
select substring_index(profile,',',-1) as gender, count(device_id) from user_submit group by gender
2025-05-17
0
38
题解 | 计算用户的平均次日留存率
# 这个理论上知道怎么弄,但是转换到MySQL命令上就毫无头绪 # 看讨论区的解题情况 # select # round(count(distinct q2.device_id,q2.date)/count(distinct q1.device_id,q1.date),4) as av...
2025-05-17
0
42
题解 | 计算用户8月每天的练题数量
# select # day(date) as day, # count(question_id) as question_cnt # from question_practice_detail # where # date like '2021-08%' # group...
2025-05-17
0
40
题解 | 查看不同年龄段的用户明细
select device_id, gender, case when age >= 25 then '25岁及以上' when age between 20 and 24 then '20-24岁' when age < 24 then '20岁以下' ...
2025-05-17
0
36
题解 | 计算25岁以上和以下的用户数量
select '25岁以下' as age_cut, count(device_id) as number from user_profile where age < 25 or age is null union all select '25岁及以上' as age_cut, count(d...
2025-05-17
0
43
题解 | 查找山东大学或者性别为男生的信息
select device_id, gender, age, gpa from user_profile where university = '山东大学' union all select device_id, gender, age, gpa from user_profile where ge...
2025-05-17
0
42
首页
上一页
10
11
12
13
14
15
16
17
18
19
下一页
末页