jjdhfbu
jjdhfbu
全部文章
分类
归档
标签
去牛客网
登录
/
注册
jjdhfbu的博客
全部文章
(共44篇)
题解 | #统计每种性别的人数#
# select if(profile like '%male','male','female') gender, # count(*) number # from user_submit # group by gender; # SELECT IF(profile LIKE '%female',...
2023-03-26
0
262
题解 | #计算用户8月每天的练题数量#
select day(date) as day, count(question_id) as question_cnt from question_practice_detail where month(date)=08 and year(date)=2021 group by date
2023-03-25
0
216
题解 | #查看不同年龄段的用户明细#
select device_id,gender, case when age<20 then "20岁以下" when age>=20 and age<=24 then "20-24岁" when age>=25 then "25岁及以上" el...
2023-03-25
0
238
题解 | #查找山东大学或者性别为男生的信息#
select device_id,gender,age,gpa from user_profile where university = "山东大学" union all select device_id,gender,age,gpa from user_profile where gender...
2023-03-25
0
194
题解 | #计算男生人数以及平均GPA#
select count(gender) as male_num, round(avg(gpa),1) as avg_gpa from user_profile where gender = "male"
2023-03-24
0
233
题解 | #查找GPA最高值#
select max(gpa) from user_profile where university = "复旦大学"
2023-03-24
0
227
题解 | #查看学校名称中含北京的用户#
select device_id,age,university from user_profile where university like "北京%"
2023-03-24
0
342
题解 | #操作符混合运用#
select device_id,gender,age,university,gpa from user_profile where (gpa>3.5 and university = "山东大学") or (gpa>3.8 and university = "复旦大学")
2023-03-24
0
241
题解 | #Where in 和Not in#
select device_id,gender,age,university,gpa from user_profile where university in ("北京大学","复旦大学","山东大学")
2023-03-24
0
192
题解 | #高级操作符练习(2)#
select device_id,gender,age,university,gpa from user_profile where university = "北京大学" or gpa > 3.7
2023-03-24
0
209
首页
上一页
1
2
3
4
5
下一页
末页