"content":"<p>Table: <code>Employee</code></p>\n\n<pre>\n+--------------+---------+\n| Column Name | Type |\n+--------------+---------+\n| id | int |\n| name | varchar |\n| salary | int |\n| departmentId | int |\n+--------------+---------+\nid is the primary key (column with unique values) for this table.\ndepartmentId is a foreign key (reference columns) of the ID from the <code>Department </code>table.\nEach row of this table indicates the ID, name, and salary of an employee. It also contains the ID of their department.\n</pre>\n\n<p> </p>\n\n<p>Table: <code>Department</code></p>\n\n<pre>\n+-------------+---------+\n| Column Name | Type |\n+-------------+---------+\n| id | int |\n| name | varchar |\n+-------------+---------+\nid is the primary key (column with unique values) for this table. It is guaranteed that department name is not <code>NULL.</code>\nEach row of this table indicates the ID of a department and its name.\n</pre>\n\n<p> </p>\n\n<p>Write a solution to find employees who have the highest salary in each of the departments.</p>\n\n<p>Return the result table in <strong>any order</strong>.</p>\n\n<p>The result format is in the following example.</p>\n\n<p> </p>\n<p><strong class=\"example\">Example 1:</strong></p>\n\n<pre>\n<strong>Input:</strong> \nEmployee table:\n+----+-------+--------+--------------+\n| id | name | salary | departmentId |\n+----+-------+--------+--------------+\n| 1 | Joe | 70000 | 1 |\n| 2 | Jim | 90000 | 1 |\n| 3 | Henry | 80000 | 2 |\n| 4 | Sam | 60000 | 2 |\n| 5 | Max | 90000 | 1 |\n+----+-------+--------+--------------+\nDepartment table:\n+----+-------+\n| id | name |\n+----+-------+\n| 1 | IT |\n| 2 | Sales |\n+----+-------+\n<strong>Output:</strong> \n+------------+----------+--------+\n| Department | Employee | Salary |\n+------------+----------+--------+\n| IT | Jim | 90000 |\n| Sales | Henry | 80000 |\n| IT | Max | 90000 |\n+------------+----------+--------+\n<strong>Explanation:</strong> Max and Jim both have the highest salary in the IT department and Henry has the highest salary in the Sales department.\n</pre>\n",
"metaData":"{\"mysql\":[\"Create table If Not Exists Employee (id int, name varchar(255), salary int, departmentId int)\",\"Create table If Not Exists Department (id int, name varchar(255))\"],\"mssql\":[\"Create table Employee (id int, name varchar(255), salary int, departmentId int)\",\"Create table Department (id int, name varchar(255))\"],\"oraclesql\":[\"Create table Employee (id int, name varchar(255), salary int, departmentId int)\",\"Create table Department (id int, name varchar(255))\"],\"database\":true,\"name\":\"department_highest_salary\",\"pythondata\":[\"Employee = pd.DataFrame([], columns=['id', 'name', 'salary', 'departmentId']).astype({'id':'Int64', 'name':'object', 'salary':'Int64', 'departmentId':'Int64'})\",\"Department = pd.DataFrame([], columns=['id', 'name']).astype({'id':'Int64', 'name':'object'})\"],\"postgresql\":[\"Create table If Not Exists Employee (id int, name varchar(255), salary int, departmentId int)\",\"Create table If Not Exists Department (id int, name varchar(255))\"],\"database_schema\":{\"Employee\":{\"id\":\"INT\",\"name\":\"VARCHAR(255)\",\"salary\":\"INT\",\"departmentId\":\"INT\"},\"Department\":{\"id\":\"INT\",\"name\":\"VARCHAR(255)\"}}}",