爱敲代码的小豪
爱敲代码的小豪
全部文章
分类
归档
标签
去牛客网
登录
/
注册
爱敲代码的小豪的博客
全部文章
(共117篇)
题解 | 重写计算逻辑
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); ...
2026-02-10
0
39
题解 | 21年8月份练题总数
select count(distinct device_id) as did_cnt, count(*) as question_cnt from question_practice_detail where date regexp '^.{6}[8]';
2026-02-10
0
30
题解 | 基本数学函数
select id,value,abs(value) as absolute_value, ceil(value) as ceiling_value,floor(value) as floor_value, round(value,1) as rounded_value from numbers ...
2026-02-10
0
30
题解 | 浙大不同难度题目的正确率
select qd.difficult_level, round(ifnull((sum(case when qpd.result = 'right' then 1 else 0 end)/nullif(count(qd.question_id),0)),0),4) as correct_rate ...
2026-02-10
0
31
题解 | 统计复旦用户8月练题情况
select up.device_id,up.university, sum(case when qpd.date regexp '[0-9]{4}(-)[0][8]' then 1 else 0 end) as question_cnt, sum(case when qpd.result = 'r...
2026-02-10
0
30
题解 | 找出每个学校GPA最低的同学
with min_gpa as ( select university,min(gpa) as min_gpa from user_profile group by university ) select up.device_id,up.university,mg.min_gpa a...
2026-02-10
0
27
题解 | 截取出年龄
select regexp_substr(regexp_replace(profile,'^.*kg,',''),'^.{2}') as age,count(*) as number from user_submit group by age;
2026-02-10
0
27
题解 | 提取博客URL中的用户名
select device_id,regexp_replace(blog_url,'^.*url/','') as user_name from user_submit;
2026-02-10
0
30
题解 | 统计每种性别的人数
select case when profile rlike 'female$' then 'female' else 'male' end as gender,count(*) as number from user_submit group by gender;
2026-02-10
0
29
题解 | 计算用户8月每天的练题数量
select day(date) as day, count(*) as question_cnt from question_practice_detail where date rlike '^[0-9]{4}(-)[0][8](-)' group by day;
2026-02-09
0
34
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页