牛客800402368号
牛客800402368号
全部文章
题解
归档
标签
去牛客网
登录
/
注册
牛客800402368号的博客
全部文章
/ 题解
(共68篇)
题解 | #获取当前薪水第二多的员工的emp_no以及其对应的薪水salary#
1、查询最高的薪水 select max(salary) from salaries 2、查询第二高的薪水 select max(salary) from salaries where salary <(select&n...
Mysql
2021-12-22
0
162
题解 | #获取当前薪水第二多的员工的emp_no以及其对应的薪水salary#
1、查询第二高的薪水是多少 select salary from salaries order by salary desc limit 1,1 2、查询薪水等于1的员工信息 select emp_no,salary fr...
Mysql
2021-12-22
0
197
题解 | #对所有员工的薪水按照salary降序进行1-N的排名#
窗口函数 :dense_rank() select emp_no,salary,dense_rank() over (order by salary desc)as t_rank from salarie...
Mysql
2021-12-22
0
214
题解 | #网易云音乐推荐(网易校招笔试真题)#
1、查询user_id=1 关注的人 select follower_id from follow where user_id=1 2、查询user_id=1 喜欢的音乐id select music_id from music_likes where use...
Mysql
2021-12-22
0
167
题解 | #商品交易(网易校招笔试真题)#
select a.id,a.name,a.weight,sum(b.count) as total from goods a join trans b on a.id=b.goods_id where weig...
Mysql
2021-12-22
0
176
题解 | #将employees表的所有员工的last_name和first_name拼接起来作为Name#
字符串拼接函数concat(字符串1,字符串2) select concat(last_name,' ',first_name) as name from employees;
Mysql
2021-12-21
0
203
题解 | #使用子查询的方式找出属于Action分类的所有电影对应的title,description#
1、查询属于Action分类的所有电影id select b.film_id from category a join film_category b on a.category_id=b.category_id where ...
Mysql
2021-12-21
0
176
题解 | #获取当前薪水第二多的员工的emp_no以及其对应的薪水salary#
SELECT employees.emp_no,salaries.salary,employees.last_name,employees.first_name from employees join salaries on employees.emp_no=salaries.emp_no wher...
Mysql
2021-11-17
0
226
首页
上一页
1
2
3
4
5
6
7
下一页
末页