Lateral
Lateral
全部文章
分类
归档
标签
去牛客网
登录
/
注册
Lateral的博客
全部文章
(共115篇)
题解 | 异常的邮件概率
with t3 as(select t1.email_id, t1.send_id,t1.ifsendblack, t2.receive_id,t2.ifreceiveblack, t2.type,t2.date from (select e.id as email_id, e.send_id,u....
2025-06-13
0
36
题解 | 刷题通过的题目排名
select *, dense_rank() over(order by number desc) as t_rank from passing_number
2025-06-06
0
39
题解 | 出现三次以上相同积分的情况
select t3.number from (select t1.number, count(*) as cnt from grade t1 join grade t2 where t1.number=t2.number and t1.id<...
2025-06-06
0
26
题解 | 统计salary的累计和running_total
select emp_no,salary, sum(salary) over(order by emp_no rows between unbounded preceding and current row) as running_total from salaries where to_date...
2025-06-06
0
36
题解 | 获取有奖金的员工相关信息。
select b.emp_no, e.first_name, e.last_name, b.btype, s.salary, case when b.btype=1 then round(s.salary*0.1,1) when b.btype=2 then round(s.sal...
2025-06-06
0
35
题解 | 使用含有关键字exists查找未分配具体部门的员工的所有信息。
select * from employees e where not exists ( select 1 from dept_emp d where e.emp_no=d.emp...
2025-06-06
0
39
题解 | 平均工资
select avg(salary) as avg_salary from salaries where (to_date='9999-01-01' and salary<>(select max(salary) from salaries...
2025-06-03
0
38
题解 | 按照dept_no进行汇总
select dept_no, group_concat(emp_no) as employees from dept_emp group by dept_no
2025-06-03
0
40
题解 | 获取employees中的first_name
select a.first_name from (select *, substr(first_name,length(first_name)-1,1) as last_but_two_word, substr(first_name,length(first_name),1) as last_wo...
2025-06-03
0
29
题解 | 查找字符串中逗号出现的次数
select id, length(string)-length(replace(string,",","")) as cnt from strings
2025-06-03
0
42
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页