牛客808484225号
牛客808484225号
全部文章
分类
归档
标签
去牛客网
登录
/
注册
牛客808484225号的博客
全部文章
(共26篇)
题解 | #计算25岁以上和以下的用户数量#
select case when age<25 or age is null then "25岁以下" when age>=25 then "25岁及以上" end as age_cut, count(*)&...
Mysql
2022-09-14
0
224
题解 | #查找山东大学或者性别为男生的信息#
select device_id,gender,age,gpa from user_profile where university='山东大学' union all select device_id,gender,age,gpa from user_profile where gend...
Mysql
2022-09-14
0
202
题解 | #统计每个用户的平均刷题数#
select university ,difficult_level,count(qpd.question_id)/count(DISTINCT qpd.device_id) as avg_answer_cnt from user_profile as u inner join question_p...
Mysql
2022-09-14
0
158
题解 | #计算用户的平均次日留存率#
SELECT COUNT(distinct q2.device_id,q2.date)/COUNT(distinct q1.device_id,q1.date) as avg_ret FROM question_practice_detail q1 LEFT JOIN question_...
Mysql
2022-09-14
0
268
题解 | #统计每种性别的人数#
SELECT substring_index(profile, ',', -1) as gender,COUNT(*) AS number FROM user_submit group by gender;
Mysql
2022-09-14
0
203
题解 | #统计每个学校各难度的用户平均刷题数#
SELECT a. university, c. difficult_level, count(b. question_id)/count(distinct a. device_id) avg_answer_cnt from user_prof...
Mysql
2022-09-14
0
203
题解 | #统计每个学校的答过题的用户的平均答题数#
select u.university, count(u.university)/count(DISTINCT u.device_id)as answer from user_profile as u inner join question_practice_detail as q on u.dev...
Mysql
2022-09-14
0
233
题解 | #浙江大学用户题目回答情况#
SELECT user_profile.device_id, question_practice_detail.question_id, question_practice_detail.result from user_profile inner join...
Mysql
2022-09-14
0
210
题解 | #分组排序练习题#
select university,avg(question_cnt) as avg_question_cnt from user_profile group by university order by avg(question_cnt);
Mysql
2022-09-13
0
217
题解 | #分组过滤练习题#
select university, avg(question_cnt) as avg_question_cnt, avg(answer_cnt) as avg_answer_cnt from user_profile group by university having avg(question_...
Mysql
2022-09-13
0
192
首页
上一页
1
2
3
下一页
末页