spln
spln
全部文章
分类
题解(18)
归档
标签
去牛客网
登录
/
注册
spln的博客
全部文章
(共17篇)
题解 | #计算25岁以上和以下的用户数量#
模糊查询 select case when profile like '%,male' then 'male' when profile like '%,female' then 'female' end as gender, count(device_id) as number from use...
Mysql
2022-01-07
0
170
题解 | #计算25岁以上和以下的用户数量#
select device_id, gender, case when age >= 25 then '25岁及以上' when age >= 20 then '20-24岁' else '其他' end as age_cnt from user_pro...
Mysql
2022-01-07
0
191
题解 | #计算25岁以上和以下的用户数量#
union select '25岁以下' as age_cnt, count(device_id) as number from user_profile where age is null or age < 25 union select '25岁及以上'as age_cnt, count(...
Mysql
2022-01-06
0
236
题解 | #查找山东大学或者性别为男生的信息#
union all不去重 where university = '山东大学' union all select device_id, gender, age, gpa from user_profile where gender = 'male';
Mysql
2022-01-06
1
335
题解 | #浙江大学用户题目回答情况#
select user_profile.device_id, question_id, result from question_practice_detail, user_profile where university = '浙江大学' and user_profile.device_id = ...
Mysql
2022-01-05
0
173
题解 | #分组过滤练习题#
avg(answer_cnt) as avg_answer_cnt from user_profile group by university having avg_question_cnt < 5 or avg_answer_cnt < 20;
Mysql
2022-01-05
0
174
题解 | #分组计算练习题#
select gender, university, count(device_id) as user_num, round(avg(active_days_within_30), 1) as avg_active_day, round(avg(question_cnt), 1) as avg...
Mysql
2022-01-05
0
189
首页
上一页
1
2
下一页
末页