mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-05 23:41:41 +08:00
存量题库数据更新
This commit is contained in:
@@ -6,13 +6,13 @@
|
||||
"boundTopicId": null,
|
||||
"title": "Find Customer Referee",
|
||||
"titleSlug": "find-customer-referee",
|
||||
"content": "<p>Table: <code>Customer</code></p>\n\n<pre>\n+-------------+---------+\n| Column Name | Type |\n+-------------+---------+\n| id | int |\n| name | varchar |\n| referee_id | int |\n+-------------+---------+\nid is the primary key column for this table.\nEach row of this table indicates the id of a customer, their name, and the id of the customer who referred them.\n</pre>\n\n<p> </p>\n\n<p>Write an SQL query to report the IDs of the customer that are <strong>not referred by</strong> the customer with <code>id = 2</code>.</p>\n\n<p>Return the result table in <strong>any 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> \nCustomer table:\n+----+------+------------+\n| id | name | referee_id |\n+----+------+------------+\n| 1 | Will | null |\n| 2 | Jane | null |\n| 3 | Alex | 2 |\n| 4 | Bill | null |\n| 5 | Zack | 1 |\n| 6 | Mark | 2 |\n+----+------+------------+\n<strong>Output:</strong> \n+------+\n| name |\n+------+\n| Will |\n| Jane |\n| Bill |\n| Zack |\n+------+\n</pre>\n",
|
||||
"content": "<p>Table: <code>Customer</code></p>\n\n<pre>\n+-------------+---------+\n| Column Name | Type |\n+-------------+---------+\n| id | int |\n| name | varchar |\n| referee_id | int |\n+-------------+---------+\nIn SQL, id is the primary key column for this table.\nEach row of this table indicates the id of a customer, their name, and the id of the customer who referred them.\n</pre>\n\n<p> </p>\n\n<p>Find the names of the customer that are <strong>not referred by</strong> the customer with <code>id = 2</code>.</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> \nCustomer table:\n+----+------+------------+\n| id | name | referee_id |\n+----+------+------------+\n| 1 | Will | null |\n| 2 | Jane | null |\n| 3 | Alex | 2 |\n| 4 | Bill | null |\n| 5 | Zack | 1 |\n| 6 | Mark | 2 |\n+----+------+------------+\n<strong>Output:</strong> \n+------+\n| name |\n+------+\n| Will |\n| Jane |\n| Bill |\n| Zack |\n+------+\n</pre>\n",
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 214,
|
||||
"dislikes": 134,
|
||||
"likes": 1690,
|
||||
"dislikes": 330,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"exampleTestcases": "{\"headers\":{\"Customer\":[\"id\",\"name\",\"referee_id\"]},\"rows\":{\"Customer\":[[1,\"Will\",null],[2,\"Jane\",null],[3,\"Alex\",2],[4,\"Bill\",null],[5,\"Zack\",1],[6,\"Mark\",2]]}}",
|
||||
@@ -45,9 +45,21 @@
|
||||
"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_customer_referee(customer: pd.DataFrame) -> pd.DataFrame:\n ",
|
||||
"__typename": "CodeSnippetNode"
|
||||
},
|
||||
{
|
||||
"lang": "PostgreSQL",
|
||||
"langSlug": "postgresql",
|
||||
"code": "-- Write your PostgreSQL query statement below\n",
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"65.3K\", \"totalSubmission\": \"84.9K\", \"totalAcceptedRaw\": 65278, \"totalSubmissionRaw\": 84891, \"acRate\": \"76.9%\"}",
|
||||
"stats": "{\"totalAccepted\": \"572.5K\", \"totalSubmission\": \"831.1K\", \"totalAcceptedRaw\": 572514, \"totalSubmissionRaw\": 831097, \"acRate\": \"68.9%\"}",
|
||||
"hints": [
|
||||
"Be careful of the NULL value"
|
||||
],
|
||||
@@ -61,7 +73,7 @@
|
||||
},
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"Customer\":[\"id\",\"name\",\"referee_id\"]},\"rows\":{\"Customer\":[[1,\"Will\",null],[2,\"Jane\",null],[3,\"Alex\",2],[4,\"Bill\",null],[5,\"Zack\",1],[6,\"Mark\",2]]}}",
|
||||
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Customer (id int, name varchar(25), referee_id int)\"\n ],\n \"mssql\": [\n \"Create table Customer (id int, name varchar(25), referee_id int)\"\n ],\n \"oraclesql\": [\n \"Create table Customer (id int, name varchar(25), referee_id int)\"\n ],\n \"database\": true\n}",
|
||||
"metaData": "{\"mysql\": [\"Create table If Not Exists Customer (id int, name varchar(25), referee_id int)\"], \"mssql\": [\"Create table Customer (id int, name varchar(25), referee_id int)\"], \"oraclesql\": [\"Create table Customer (id int, name varchar(25), referee_id int)\"], \"database\": true, \"name\": \"find_customer_referee\", \"pythondata\": [\"Customer = pd.DataFrame([], columns=['id', 'name', 'referee_id']).astype({'id':'Int64', 'name':'object', 'referee_id':'Int64'})\"], \"postgresql\": [\"Create table If Not Exists Customer (id int, name varchar(25), referee_id int)\"], \"database_schema\": {\"Customer\": {\"id\": \"INT\", \"name\": \"VARCHAR(25)\", \"referee_id\": \"INT\"}}}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
@@ -77,7 +89,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