snowiest
snowiest
全部文章
分类
题解(9)
归档
标签
去牛客网
登录
/
注册
snowiest的博客
全部文章
(共5篇)
题解 | #浙大不同难度题目的正确率#
SELECT difficult_level,SUM(IF(result='right',1,0))/COUNT(*) AS correct_rateFROM user_profile AS upINNER JOIN question_practice_detail AS qpdINNER JOIN...
2021-08-31
24
1170
题解 | #21年8月份练题总数#
SELECT COUNT(DISTINCT device_id) AS did_cnt,COUNT(device_id) AS question_cntFROM question_practice_detailWHERE YEAR(date)=2021 AND MONTH(date)=8
2021-08-31
14
1276
题解 | #统计复旦用户8月练题情况#
需要判断月份 通过IF语句可以设置值 用SUM统计所有值 SELECT up.device_id,up.university,SUM(IF(MONTH(date)=8,1,0)) AS question_cnt,SUM(IF(MONTH(date)=8 AND result='right',1,0)...
2021-08-31
101
4446
题解 | #查找山东大学男生的GPA#
# if判断 SELECT IF(age<25 OR age IS NULL,'25岁以下','25岁以及上') age_cut,COUNT(device_id) Number FROM user_profile GROUP BY age_cut # 联合查询 SEL...
2021-08-31
224
7891
题解 | #查找山东大学男生的GPA#
SELECT device_id,gender,age,gpaFROM user_profileWHERE university = '山东大学'UNION ALLSELECT device_id,gender,age,gpaFROM user_profileWHERE gender = 'male...
2021-08-31
2
708