问题描述

解决方案

select b.Name Department,a.Name Employee,a.Salary from
(
select e1.Salary,e1.Name,e1.DepartmentId from Employee e1
where e1.Salary=(select max(Salary) from Employee e2 where e1.DepartmentId=e2.DepartmentId)
) a,Department b where a.DepartmentId=b.Id

184. Department Highest Salary的更多相关文章

  1. 【SQL】184. Department Highest Salary

    The Employee table holds all employees. Every employee has an Id, a salary, and there is also a colu ...

  2. [LeetCode#184]Department Highest Salary

    The Employee table holds all employees. Every employee has an Id, a salary, and there is also a colu ...

  3. [LeetCode] Department Highest Salary -- 数据库知识(mysql)

    184. Department Highest Salary The Employee table holds all employees. Every employee has an Id, a s ...

  4. leetcode Database3(Nth Highest Salary<—>Consecutive Numbers<—>Department Highest Salary)

    一.Nth Highest Salary Write a SQL query to get the nth highest salary from the Employee table. +----+ ...

  5. [LeetCode] Department Highest Salary 系里最高薪水

    The Employee table holds all employees. Every employee has an Id, a salary, and there is also a colu ...

  6. [SQL]LeetCode184. 部门工资最高的员工 | Department Highest Salary

    The Employee table holds all employees. Every employee has an Id, a salary, and there is also a colu ...

  7. LeetCode DB: Department Highest Salary

    The Employee table holds all employees. Every employee has an Id, a salary, and there is also a colu ...

  8. Department Highest Salary

    The Employee table holds all employees. Every employee has an Id, a salary, and there is also a colu ...

  9. LeetCode——Department Highest Salary(花式使用IN以及GROUP BY)

    The Employee table holds all employees. Every employee has an Id, a salary, and there is also a colu ...

随机推荐

  1. MySql 的备份与恢复

    1. 数据库导出 SQL 脚本 mysqldump -u 用户名 -p 密码 数据库名称>生成的脚本文件路径 示例: mysqldump -uroot -p 123 mydb1>/User ...

  2. javascript之冒泡排序

    Array.prototype.bubble = function () { var temp; //第1轮比较求第一,第二轮求第二,以此类推(i<=数组成员的个数); for (var i = ...

  3. Django的models方法返回值异常,待解决

    class BookInfo(models.Model): #创建书本信息类,继承models.Model booktitle=models.CharField(max_length=20) book ...

  4. Asp.Net MVC anti-forgery token的问题:nameidentifier not present

    前一篇关于anti-forgery token问题的博文提到我们可以通过修改AntiForgeryConfig.UniqueClaimTypeIdentifier属性来避免AntiForgeryTok ...

  5. python 获取exception 名字

    def func(): list = [] usr = input('username:') pwd = input('password:') try: list[4] # 这个是调用不了的,因为列表 ...

  6. Codeforces 240F. TorCoder 线段树

    线段树统计和维护某一区间内的字母个数.. . . F. TorCoder time limit per test 3 seconds memory limit per test 256 megabyt ...

  7. vue-cli 搭建项目

    1.cnpm install -g vue-cli 2.vue -V(注意大写,查vue版本) 3.vue init webpack vue1(创建vue1目录) 4.cd vue1(定位到目录中) ...

  8. 剑指offer 面试45题

    面试45题: 题:把数组排成最小的数 题目:输入一个正整数数组,把数组里所有数字拼接起来排成一个数,打印能拼接出的所有数字中最小的一个.例如输入数组{3,32,321},则打印出这三个数字能排成的最小 ...

  9. 剑指offer 面试53题

    面试53题: 题目:统计一个数字在排序数组中出现的次数. 思路:二分查找法,分别找到此数字在排序数组中第一次和最后一次出现的位置,然后次数等于两个位置之差加1. 时间复杂度:O(log n) 解题代码 ...

  10. MySql安装成功后命令行进行必要的配置

    1.1 首次用命令行登录 用zip方式安装成功mysql,并通过net start mysql 命令正常启动mysql服务后,打开dos命令行窗口,输入“mysql -uroot -p”或“mysql ...