GB279824
GB279824
全部文章
分类
归档
标签
去牛客网
登录
/
注册
GB279824的博客
全部文章
(共190篇)
题解 | 刷题通过的题目排名
# select id,number, # dense_rank() over(order by number DESC) dr # from passing_number # order by # dr ASC,id ASC; select id,number, de...
2025-05-26
0
40
题解 | 出现三次以上相同积分的情况
select number from grade group by number having count(number) >=3 order by number ASC;
2025-05-26
0
47
题解 | 给出employees表中排名为奇数行的first_name
select e.first_name from employees e where ( select count(*) from employees e1 where e.first_name >= e1.first_name ) % 2 = 1; 1)为什么是>...
2025-05-26
0
34
题解 | 获取有奖金的员工相关信息。
select e.emp_no,first_name,last_name,btype,salary, (case btype when 1 then salary*0.1 when 2 then salary*0.2 else salary * 0.3 end) as...
2025-05-26
0
33
题解 | 使用含有关键字exists查找未分配具体部门的员工的所有信息。
select * from employees e where not exists( select emp_no from dept_emp d where e.emp_no = d.emp_no );
2025-05-25
0
35
题解 | 分页查询employees表,每5行一页,返回第2页的数据
# select * # from employees # limit (2-1)*5,5; select * from employees limit 5 offset 5;
2025-05-25
0
45
题解 | 平均工资
select avg(salary) as avg_salary from salaries where to_date = '9999-01-01' and salary not in (select max(salary) from salaries where to_date = '9999-...
2025-05-25
0
41
题解 | 按照dept_no进行汇总
select dept_no, group_concat(emp_no) as employees from dept_emp group by dept_no; GROUP_CONCAT([DISTINCT] column_name [ORDER BY column_name [A...
2025-05-25
0
35
题解 | 获取employees中的first_name
select first_name from employees order by substring(first_name,-2,2) ASC;
2025-05-25
0
35
题解 | 查找字符串中逗号出现的次数
select id,length(string)-length(replace(string,',','')) from strings; 用总的字符长度减去删除掉','符号的字符总长度得到的就是其中','符号的数量。
2025-05-25
0
34
首页
上一页
5
6
7
8
9
10
11
12
13
14
下一页
末页