牛客797465787号
牛客797465787号
全部文章
分类
题解(48)
归档
标签
去牛客网
登录
/
注册
牛客797465787号的博客
全部文章
(共30篇)
题解 | #统计每个用户的平均刷题数#
select university, difficult_level , round(count(q.question_id) / count(distinct q.device_id) ,4) as avg_answer_cnt from user_profile u in...
Mysql
2022-06-22
0
162
题解 | #统计每个学校各难度的用户平均刷题数#
select university , difficult_level, round(ifnull(count(q.question_id) / count(distinct u.id),0),4) avg_answer_cnt from user_profile u in...
Mysql
2022-06-22
0
133
题解 | #统计每个学校的答过题的用户的平均答题数#
select u.university ,round(ifnull(count(q.question_id) / count(distinct q.device_id),0) ,4) avg_answer_cnt from user_profile u inner join questi...
Mysql
2022-06-22
0
129
题解 | #浙江大学用户题目回答情况#
select device_id,question_id,result from question_practice_detail where device_id in (select device_id from user_profile where unive...
Mysql
2022-06-22
0
115
题解 | #找出每个学校GPA最低的同学#
select device_id,university, gpa from (select device_id ,university, gpa, row_number() over(partition by university order by gpa) rn from ...
Mysql
2022-06-22
0
163
题解 | #截取出年龄#
select regexp_substr(profile,'[^,]+',1,3) age , count(*) from user_submit group by regexp_substr(profile,'[^,]+',1,3)
Mysql
2022-06-22
0
168
题解 | #统计每种性别的人数#
select regexp_substr(profile,'[^,]+',1,4) gender, count(*) from user_submit group by regexp_substr(profile,'[^,]+',1,4)
Mysql
2022-06-22
0
123
题解 | #计算用户8月每天的练题数量#
select date_format(date,'%d') day , count(*) question_cnt from question_practice_detail where date_format(date,'%m')=08 group by day...
Mysql
2022-06-22
0
201
题解 | #查看不同年龄段的用户明细#
select device_id , gender , case when age<20 then '20岁以下' when age>=20 and age<25 then '20-24岁' when age>=25 then '25岁及以上' else '其他' end a...
Mysql
2022-06-22
0
110
题解 | #计算25岁以上和以下的用户数量#
select u1.age_cut ,count(*) from (select case when u.age>=25 then '25岁及以上' else '25岁以下' end age_cut from user_profile u) u1 group by u1.age_cut ...
Mysql
2022-06-21
0
195
首页
上一页
1
2
3
下一页
末页