平平无奇的灌木丛
平平无奇的灌木丛
全部文章
分类
题解(32)
归档
标签
去牛客网
登录
/
注册
杨硕琦太调皮了
倘若你的眼神一直这么冰冷,某人的心会结冰的
TA的专栏
0篇文章
0人订阅
学习记录
0篇文章
0人学习
全部文章
(共30篇)
题解 | #查看不同年龄段的用户明细#
select device_id, gender, case when age < 20 then '20岁以下' when age <= 24 and age >= 20 then '20-24岁' when age >= 25 then '25岁及以上' else '其...
Mysql
2022-01-11
0
303
题解 | #计算25岁以上和以下的用户数量#
select if(age >= 25, '25岁及以上', '25岁以下') as age_cut, COUNT(device_id) as number from user_profile group by age_cut 这题我不会 基本没有写过if语句
Mysql
2022-01-11
0
288
题解 | #查找山东大学或者性别为男生的信息#
# or默认去重 # select device_id, gender, age, gpa from user_profile WHERE university = '山东大学' or gender = 'male'; # 使用union all 不去重 select device_id, gen...
Mysql
2022-01-11
0
286
题解 | #统计每个用户的平均刷题数#
select university, difficult_level, count(qpd.question_id) / count(DISTINCT qpd.device_id) as avg_answer_cnt from question_practice_detail qpd LEFT J...
Mysql
2022-01-10
0
266
题解 | #统计每个学校各难度的用户平均刷题数#
select university, difficult_level, COUNT(qpd.question_id) / COUNT(DISTINCT qpd.device_id) AS avg_answer_cnt from question_practice_detail qpd LEFT JO...
Mysql
2022-01-10
1
305
题解 | #统计每个学校的答过题的用户的平均答题数#
# SELECT # university, # count(q.question_id) / count(distinct(q.device_id)) as avg_answer_cnt # from user_profile u, question_practice_detail q # W...
Mysql
2022-01-10
0
356
题解 | #浙江大学用户题目回答情况#
select u.device_id, q.question_id, q.result from question_practice_detail q, user_profile u WHERE q.device_id = u.device_id and university = '浙江大学';
Mysql
2022-01-09
1
418
题解 | #分组排序练习题#
FROM - ON - JOIN - WHERE - GROUP BY - WITH - HAVING - SELECT - DISTINCT - ORDER BY - LIMIT select university, avg(question_cnt) as avg_question_cnt f...
Mysql
2022-01-09
2
350
题解 | #分组过滤练习题#
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-01-09
0
272
题解 | #分组计算练习题#
SELECT gender, university, COUNT(device_id) AS user_num, AVG(active_days_within_30) AS avg_active_day, AVG(question_cnt) AS avg_question_cnt FRO...
Mysql
2022-01-09
0
316
首页
上一页
1
2
3
下一页
末页