GB279824
GB279824
全部文章
分类
归档
标签
去牛客网
登录
/
注册
GB279824的博客
全部文章
(共162篇)
题解 | 异常的邮件概率
# select date, # round(sum(case when type = 'no_completed' then 1 else 0 end)/count(date),3) as p # from email e # join user u on e.send_id = u.id...
2025-05-26
0
24
题解 | 找到每个人的任务
select p.id,name,content from person p left join task t on p.id = t.person_id order by p.id ASC;
2025-05-26
0
18
题解 | 刷题通过的题目排名
# 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
22
题解 | 出现三次以上相同积分的情况
select number from grade group by number having count(number) >=3 order by number ASC;
2025-05-26
0
22
题解 | 给出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
19
题解 | 获取有奖金的员工相关信息。
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
16
题解 | 使用含有关键字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
15
题解 | 分页查询employees表,每5行一页,返回第2页的数据
# select * # from employees # limit (2-1)*5,5; select * from employees limit 5 offset 5;
2025-05-25
0
18
题解 | 平均工资
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
17
题解 | 按照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
16
首页
上一页
2
3
4
5
6
7
8
9
10
11
下一页
末页