想到就去做
想到就去做
全部文章
题解
归档
标签
去牛客网
登录
/
注册
想到就去做的博客
全部文章
/ 题解
(共41篇)
题解 | #获得积分最多的人(三)#
select u.id,u.name,c.sp grade_sumfrom (select b.user_id,b.sp,rank()over(order by b.sp desc) r from (select a.user_id,sum(a.p) sp from ...
2021-09-07
0
272
题解 | #牛客的课程订单分析(七)#
select source,count()from (select oi.,(case when oi.is_group_buy = 'Yes' then 'GroupBuy' else c.name end) source, count(*)over(partition by user_...
2021-09-07
1
311
题解 | #对于employees表中,给出奇数行的first_name#
select first_namefrom (select first_name,rank()over(order by first_name)rk from employees order by emp_no) twhere rk%2 = 1;
2021-09-07
1
311
题解 | #汇总各个部门当前员工的title类型的分配数目#
select d.dept_no,d.dept_name,t.title, count(*) countfrom departments djoin dept_emp deon d.dept_no = de.dept_nojoin titles ton de.emp_no = t.emp...
2021-09-07
1
289
题解 | #获得积分最多的人(二)#
select user.id,user.name, t.grade_sum from (select user_id,sum(grade_num)over(partition by user_id) grade_sumfrom grade_info) t join useron t.user_id ...
2021-09-07
1
383
题解 | #牛客每个人最近的登录日期(四)#
select login_date date, sum(case when login_date = first_date then 1 else 0 end) newfrom (select date login_date, min(date)over(partition ...
2021-09-07
1
406
题解 | #获取员工其当前的薪水比其manager当前薪水还高的相关信息#
select es.emp_no, ms.manager_no, es.emp_salary, ms.manager_salaryfrom(select de.dept_no,de.emp_no emp_no,s.salary emp_salaryfrom dep...
2021-09-06
1
440
题解 | #牛客每个人最近的登录日期(六)#
select u.name u_n,p.date date, sum(p.number)over(partition by p.user_id order by date) ps_numfrom passing_number p left join user uon p.user_id ...
2021-09-06
1
380
题解 | #牛客的课程订单分析(四)#
select user_id,min(date) first_buy_date,cntfrom (select , count()over(partition by user_id) cnt from order_info where status = 'completed'...
2021-09-04
1
414
题解 | #牛客每个人最近的登录日期(二)#
select u.name u_n,c.name c_name,t.date datefrom (select *,max(date)over(partition by user_id) t_maxfrom login) tjoin user uon t.user_id = u.idjoin cli...
2021-09-04
1
318
首页
上一页
1
2
3
4
5
下一页
末页