垫底菜鸡
垫底菜鸡
全部文章
分类
归档
标签
去牛客网
登录
/
注册
垫底菜鸡的博客
全部文章
(共53篇)
题解 | #查找后多列排序#
select device_id,gpa,age from user_profile order by gpa asc,age asc # 1/3组用例通过 and改逗号,就出来了。不过不是很懂原理
2023-03-04
0
161
题解 | #查找后排序#
select device_id,age from user_profile order by age asc 在中等和困难里挣扎后,突然遇到一道入门,也太快乐了
2023-03-04
0
171
题解 | #浙大不同难度题目的正确率#
select qd.difficult_level, #正确率是答正确的题/总题数 sum(if(result='right',1,0))/count(qpd.question_id) as correct_rate from user_profile as up inner join quest...
2023-03-04
0
250
题解 | #统计复旦用户8月练题情况#
select up.device_id,up.university, count(qpd.question_id) as question_cnt, sum(if(qpd.result='right',1,0)) as right_question_cut from user_profile as ...
2023-03-04
0
185
题解 | #找出每个学校GPA最低的同学#
select device_id,university,gpa from user_profile where (university,gpa) in (select university,min(gpa) from user_profile group by university) order b...
2023-03-03
0
178
题解 | #截取出年龄#
select substring_index(substring_index(profile,',',3),',',-1) as age, count(device_id) as number from user_submit group by age 老是漏写,
2023-03-03
0
187
题解 | #提取博客URL中的用户名#
select device_id, substring_index(blog_url,'/',-1) from user_submit #group by device_id 有聚合函数的情况下才需要group by
2023-03-03
0
218
题解 | #统计每种性别的人数#
select substring_index(profile,',',-1) as gender, count(device_id) as number from user_submit group by gender group by和count(device_id)确实是没有想到的
2023-03-03
0
189
题解 | #计算用户的平均次日留存率#
select count(date2) / count(date1) as avg_ret from ( select distinct qpd.device_id, qpd.date as date1, uniq_id_date.date a...
2023-03-03
0
214
题解 | #计算用户8月每天的练题数量#
select day(date) as day, count(question_id) as question_cnt from question_practice_detail where month(date) = 8 and year(date) = 2021 group by date 一遇...
2023-03-03
0
199
首页
上一页
1
2
3
4
5
6
下一页
末页