人生苦短,但求成长
人生苦短,但求成长
全部文章
题解
归档
标签
去牛客网
登录
/
注册
人生苦短,但求成长的博客
全部文章
/ 题解
(共86篇)
题解 | #截取出年龄#
select substring_index(substring_index(profile, ',', -2), ',', 1) as age, count(1) as number from user_submit group by age
Mysql
Oracle
2022-03-12
2
328
题解 | #提取博客URL中的用户名#
select device_id, substring_index(blog_url, '/', -1) as user_name from user_submit
Mysql
2022-03-12
1
261
题解 | #查看不同年龄段的用户明细#
select substring_index(PROFILE, ',', -1) as gender, count(1) as number from user_submit group by gender
Mysql
2022-03-12
2
240
题解 | #查看不同年龄段的用户明细#题意不清,给的例子也不全
SELECT count(distinct q2.device_id,q2.date)/count(distinct q1.device_id,q1.date) as avg_ret FROM question_practice_detail as q1 left outer join questi...
Mysql
2022-03-12
2
240
题解 | #查看不同年龄段的用户明细#
select day(date) as day, count(question_id) as question_cnt from question_practice_detail where month(date) = '8' group by day
Mysql
2022-03-12
1
283
题解 | #查看不同年龄段的用户明细#
select device_id ,gender ,case when age < 20 then '20岁以下' when age >= 20 and age < 24 then '20-24岁' when age >= 25 then '25岁及以...
Mysql
2022-03-12
1
264
题解 | #计算25岁以上和以下的用户数量#
select if(age >= 25,'25岁及以上','25岁以下') as age_cut, count(1) &nb...
Mysql
2022-03-12
5
338
题解 | #查找山东大学或者性别为男生的信息#
select device_id,gender,age,gpa from user_profile where university = '山东大学' union all select device_id,gender,age,gpa from user_profile where gender =...
Mysql
2022-03-12
1
258
题解 | #统计每个用户的平均刷题数#
select t1.university,t3.difficult_level, round(count(t2.question_id)/count(distinct t1.device_id),4) as avg_answer_cnt from user_profile t1 jo...
Mysql
2022-03-12
1
264
题解 | #统计每个学校各难度的用户平均刷题数#
select t1.university,t3.difficult_level, round(count(1)/count(distinct t1.device_id),4) as avg_answer_cnt from user_profile t1 join question_pr...
Mysql
2022-03-11
1
0
首页
上一页
1
2
3
4
5
6
7
8
9
下一页
末页