mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-07 00:11:41 +08:00
存量题库数据更新
This commit is contained in:
@@ -6,13 +6,13 @@
|
||||
"boundTopicId": null,
|
||||
"title": "Employees With Missing Information",
|
||||
"titleSlug": "employees-with-missing-information",
|
||||
"content": "<p>Table: <code>Employees</code></p>\n\n<pre>\n+-------------+---------+\n| Column Name | Type |\n+-------------+---------+\n| employee_id | int |\n| name | varchar |\n+-------------+---------+\nemployee_id is the primary key for this table.\nEach row of this table indicates the name of the employee whose ID is employee_id.\n</pre>\n\n<p> </p>\n\n<p>Table: <code>Salaries</code></p>\n\n<pre>\n+-------------+---------+\n| Column Name | Type |\n+-------------+---------+\n| employee_id | int |\n| salary | int |\n+-------------+---------+\nemployee_id is the primary key for this table.\nEach row of this table indicates the salary of the employee whose ID is employee_id.\n</pre>\n\n<p> </p>\n\n<p>Write an SQL query to report the IDs of all the employees with <strong>missing information</strong>. The information of an employee is missing if:</p>\n\n<ul>\n\t<li>The employee's <strong>name</strong> is missing, or</li>\n\t<li>The employee's <strong>salary</strong> is missing.</li>\n</ul>\n\n<p>Return the result table ordered by <code>employee_id</code> <strong>in ascending order</strong>.</p>\n\n<p>The query result format is in the following example.</p>\n\n<p> </p>\n<p><strong>Example 1:</strong></p>\n\n<pre>\n<strong>Input:</strong> \nEmployees table:\n+-------------+----------+\n| employee_id | name |\n+-------------+----------+\n| 2 | Crew |\n| 4 | Haven |\n| 5 | Kristian |\n+-------------+----------+\nSalaries table:\n+-------------+--------+\n| employee_id | salary |\n+-------------+--------+\n| 5 | 76071 |\n| 1 | 22517 |\n| 4 | 63539 |\n+-------------+--------+\n<strong>Output:</strong> \n+-------------+\n| employee_id |\n+-------------+\n| 1 |\n| 2 |\n+-------------+\n<strong>Explanation:</strong> \nEmployees 1, 2, 4, and 5 are working at this company.\nThe name of employee 1 is missing.\nThe salary of employee 2 is missing.\n</pre>\n",
|
||||
"content": "<p>Table: <code>Employees</code></p>\n\n<pre>\n+-------------+---------+\n| Column Name | Type |\n+-------------+---------+\n| employee_id | int |\n| name | varchar |\n+-------------+---------+\nemployee_id is the column with unique values for this table.\nEach row of this table indicates the name of the employee whose ID is employee_id.\n</pre>\n\n<p> </p>\n\n<p>Table: <code>Salaries</code></p>\n\n<pre>\n+-------------+---------+\n| Column Name | Type |\n+-------------+---------+\n| employee_id | int |\n| salary | int |\n+-------------+---------+\nemployee_id is the column with unique values for this table.\nEach row of this table indicates the salary of the employee whose ID is employee_id.\n</pre>\n\n<p> </p>\n\n<p>Write a solution to report the IDs of all the employees with <strong>missing information</strong>. The information of an employee is missing if:</p>\n\n<ul>\n\t<li>The employee's <strong>name</strong> is missing, or</li>\n\t<li>The employee's <strong>salary</strong> is missing.</li>\n</ul>\n\n<p>Return the result table ordered by <code>employee_id</code> <strong>in ascending 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> \nEmployees table:\n+-------------+----------+\n| employee_id | name |\n+-------------+----------+\n| 2 | Crew |\n| 4 | Haven |\n| 5 | Kristian |\n+-------------+----------+\nSalaries table:\n+-------------+--------+\n| employee_id | salary |\n+-------------+--------+\n| 5 | 76071 |\n| 1 | 22517 |\n| 4 | 63539 |\n+-------------+--------+\n<strong>Output:</strong> \n+-------------+\n| employee_id |\n+-------------+\n| 1 |\n| 2 |\n+-------------+\n<strong>Explanation:</strong> \nEmployees 1, 2, 4, and 5 are working at this company.\nThe name of employee 1 is missing.\nThe salary of employee 2 is missing.\n</pre>\n",
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 84,
|
||||
"dislikes": 4,
|
||||
"likes": 658,
|
||||
"dislikes": 35,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"exampleTestcases": "{\"headers\":{\"Employees\":[\"employee_id\",\"name\"],\"Salaries\":[\"employee_id\",\"salary\"]},\"rows\":{\"Employees\":[[2,\"Crew\"],[4,\"Haven\"],[5,\"Kristian\"]],\"Salaries\":[[5,76071],[1,22517],[4,63539]]}}",
|
||||
@@ -45,14 +45,26 @@
|
||||
"langSlug": "oraclesql",
|
||||
"code": "/* Write your PL/SQL query statement below */\n",
|
||||
"__typename": "CodeSnippetNode"
|
||||
},
|
||||
{
|
||||
"lang": "Pandas",
|
||||
"langSlug": "pythondata",
|
||||
"code": "import pandas as pd\n\ndef find_employees(employees: pd.DataFrame, salaries: pd.DataFrame) -> pd.DataFrame:\n ",
|
||||
"__typename": "CodeSnippetNode"
|
||||
},
|
||||
{
|
||||
"lang": "PostgreSQL",
|
||||
"langSlug": "postgresql",
|
||||
"code": "-- Write your PostgreSQL query statement below\n",
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"9.5K\", \"totalSubmission\": \"11.6K\", \"totalAcceptedRaw\": 9456, \"totalSubmissionRaw\": 11628, \"acRate\": \"81.3%\"}",
|
||||
"stats": "{\"totalAccepted\": \"109K\", \"totalSubmission\": \"151.2K\", \"totalAcceptedRaw\": 108992, \"totalSubmissionRaw\": 151227, \"acRate\": \"72.1%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"Employees\":[\"employee_id\",\"name\"],\"Salaries\":[\"employee_id\",\"salary\"]},\"rows\":{\"Employees\":[[2,\"Crew\"],[4,\"Haven\"],[5,\"Kristian\"]],\"Salaries\":[[5,76071],[1,22517],[4,63539]]}}",
|
||||
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Employees (employee_id int, name varchar(30))\",\n \"Create table If Not Exists Salaries (employee_id int, salary int)\"\n ],\n \"mssql\": [\n \"Create table Employees (employee_id int, name varchar(30))\",\n \"Create table Salaries (employee_id int, salary int)\"\n ],\n \"oraclesql\": [\n \"Create table Employees (employee_id int, name varchar(30))\",\n \"Create table Salaries (employee_id int, salary int)\"\n ],\n \"database\": true\n}",
|
||||
"metaData": "{\"mysql\": [\"Create table If Not Exists Employees (employee_id int, name varchar(30))\", \"Create table If Not Exists Salaries (employee_id int, salary int)\"], \"mssql\": [\"Create table Employees (employee_id int, name varchar(30))\", \"Create table Salaries (employee_id int, salary int)\"], \"oraclesql\": [\"Create table Employees (employee_id int, name varchar(30))\", \"Create table Salaries (employee_id int, salary int)\"], \"database\": true, \"name\": \"find_employees\", \"pythondata\": [\"Employees = pd.DataFrame([], columns=['employee_id', 'name']).astype({'employee_id':'Int64', 'name':'object'})\", \"Salaries = pd.DataFrame([], columns=['employee_id', 'salary']).astype({'employee_id':'Int64', 'salary':'Int64'})\"], \"postgresql\": [\"Create table If Not Exists Employees (employee_id int, name varchar(30))\", \"Create table If Not Exists Salaries (employee_id int, salary int)\"], \"database_schema\": {\"Employees\": {\"employee_id\": \"INT\", \"name\": \"VARCHAR(30)\"}, \"Salaries\": {\"employee_id\": \"INT\", \"salary\": \"INT\"}}}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
@@ -70,7 +82,7 @@
|
||||
"enableRunCode": true,
|
||||
"enableTestMode": false,
|
||||
"enableDebugger": false,
|
||||
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
|
||||
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"], \"pythondata\": [\"Pandas\", \"<p>Python 3.10 with Pandas 2.0.2 and NumPy 1.25.0</p>\"], \"postgresql\": [\"PostgreSQL\", \"<p>PostgreSQL 16</p>\"]}",
|
||||
"libraryUrl": null,
|
||||
"adminUrl": null,
|
||||
"challengeQuestion": null,
|
||||
|
Reference in New Issue
Block a user