1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-08 00:41:42 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

批量更新数据

This commit is contained in:
2025-01-09 20:29:41 +08:00
parent 04ecea043d
commit 48cdd06c2b
5053 changed files with 156164 additions and 135322 deletions

View File

@@ -12,12 +12,12 @@
"translatedContent": "<p>表:&nbsp;<code>SalesPerson</code></p>\n\n<pre>\n+-----------------+---------+\n| Column Name | Type |\n+-----------------+---------+\n| sales_id | int |\n| name | varchar |\n| salary | int |\n| commission_rate | int |\n| hire_date | date |\n+-----------------+---------+\nsales_id 是该表的主键列(具有唯一值的列)。\n该表的每一行都显示了销售人员的姓名和 ID ,以及他们的工资、佣金率和雇佣日期。\n</pre>\n\n<p>&nbsp;</p>\n\n<p>表:&nbsp;<code>Company</code></p>\n\n<pre>\n+-------------+---------+\n| Column Name | Type |\n+-------------+---------+\n| com_id | int |\n| name | varchar |\n| city | varchar |\n+-------------+---------+\ncom_id 是该表的主键列(具有唯一值的列)。\n该表的每一行都表示公司的名称和 ID ,以及公司所在的城市。\n</pre>\n\n<p>&nbsp;</p>\n\n<p>表:&nbsp;<code>Orders</code></p>\n\n<pre>\n+-------------+------+\n| Column Name | Type |\n+-------------+------+\n| order_id | int |\n| order_date | date |\n| com_id | int |\n| sales_id | int |\n| amount | int |\n+-------------+------+\norder_id 是该表的主键列(具有唯一值的列)。\ncom_id 是 Company 表中 com_id 的外键reference 列)。\nsales_id 是来自销售员表 sales_id 的外键reference 列)。\n该表的每一行包含一个订单的信息。这包括公司的 ID 、销售人员的 ID 、订单日期和支付的金额。\n</pre>\n\n<p>&nbsp;</p>\n\n<p>编写解决方案,找出没有任何与名为 <strong>“RED”</strong> 的公司相关的订单的所有销售人员的姓名。</p>\n\n<p>以 <strong>任意顺序</strong> 返回结果表。</p>\n\n<p>返回结果格式如下所示。</p>\n\n<p>&nbsp;</p>\n\n<p><strong>示例 1</strong></p>\n\n<pre>\n<strong>输入:</strong>\nSalesPerson 表:\n+----------+------+--------+-----------------+------------+\n| sales_id | name | salary | commission_rate | hire_date |\n+----------+------+--------+-----------------+------------+\n| 1 | John | 100000 | 6 | 4/1/2006 |\n| 2 | Amy | 12000 | 5 | 5/1/2010 |\n| 3 | Mark | 65000 | 12 | 12/25/2008 |\n| 4 | Pam | 25000 | 25 | 1/1/2005 |\n| 5 | Alex | 5000 | 10 | 2/3/2007 |\n+----------+------+--------+-----------------+------------+\nCompany 表:\n+--------+--------+----------+\n| com_id | name | city |\n+--------+--------+----------+\n| 1 | RED | Boston |\n| 2 | ORANGE | New York |\n| 3 | YELLOW | Boston |\n| 4 | GREEN | Austin |\n+--------+--------+----------+\nOrders 表:\n+----------+------------+--------+----------+--------+\n| order_id | order_date | com_id | sales_id | amount |\n+----------+------------+--------+----------+--------+\n| 1 | 1/1/2014 | 3 | 4 | 10000 |\n| 2 | 2/1/2014 | 4 | 5 | 5000 |\n| 3 | 3/1/2014 | 1 | 1 | 50000 |\n| 4 | 4/1/2014 | 1 | 4 | 25000 |\n+----------+------------+--------+----------+--------+\n<strong>输出:</strong>\n+------+\n| name |\n+------+\n| Amy |\n| Mark |\n| Alex |\n+------+\n<strong>解释:</strong>\n根据表&nbsp;<code>orders</code>&nbsp;中的订单 '3' 和 '4' ,容易看出只有 'John' 和 'Pam' 两个销售员曾经向公司 'RED' 销售过。\n所以我们需要输出表&nbsp;<code>salesperson</code>&nbsp;中所有其他人的名字。</pre>\n",
"isPaidOnly": false,
"difficulty": "Easy",
"likes": 168,
"likes": 196,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": "{\"cpp\": false, \"java\": false, \"python\": false, \"python3\": false, \"mysql\": false, \"mssql\": false, \"oraclesql\": false, \"c\": false, \"csharp\": false, \"javascript\": false, \"typescript\": false, \"bash\": false, \"php\": false, \"swift\": false, \"kotlin\": false, \"dart\": false, \"golang\": false, \"ruby\": false, \"scala\": false, \"html\": false, \"pythonml\": false, \"rust\": false, \"racket\": false, \"erlang\": false, \"elixir\": false, \"pythondata\": false, \"react\": false, \"vanillajs\": false, \"postgresql\": false}",
"langToValidPlayground": "{\"cpp\": false, \"java\": false, \"python\": false, \"python3\": false, \"mysql\": false, \"mssql\": false, \"oraclesql\": false, \"c\": false, \"csharp\": false, \"javascript\": false, \"typescript\": false, \"bash\": false, \"php\": false, \"swift\": false, \"kotlin\": false, \"dart\": false, \"golang\": false, \"ruby\": false, \"scala\": false, \"html\": false, \"pythonml\": false, \"rust\": false, \"racket\": false, \"erlang\": false, \"elixir\": false, \"pythondata\": false, \"react\": false, \"vanillajs\": false, \"postgresql\": false, \"cangjie\": false}",
"topicTags": [
{
"name": "Database",
@@ -59,7 +59,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"80.9K\", \"totalSubmission\": \"120.8K\", \"totalAcceptedRaw\": 80942, \"totalSubmissionRaw\": 120838, \"acRate\": \"67.0%\"}",
"stats": "{\"totalAccepted\": \"101.3K\", \"totalSubmission\": \"152.5K\", \"totalAcceptedRaw\": 101322, \"totalSubmissionRaw\": 152479, \"acRate\": \"66.4%\"}",
"hints": [
"You need to query who sold to company 'RED' first, then output the sales person who is not in the first query result."
],
@@ -91,7 +91,7 @@
"insert into Orders (order_id, order_date, com_id, sales_id, amount) values ('4', '4/1/2014', '1', '4', '25000')"
],
"enableRunCode": true,
"envInfo": "{\"mysql\":[\"MySQL\",\"<p>\\u7248\\u672c\\uff1a<code>MySQL 8.0<\\/code><\\/p>\"],\"mssql\":[\"MS SQL Server\",\"<p>mssql server 2019.<\\/p>\"],\"oraclesql\":[\"Oracle\",\"<p>Oracle Sql 11.2.<\\/p>\"],\"pythondata\":[\"Pandas\",\"<p>Python 3.10 with Pandas 2.0.2 and NumPy 1.25.0<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
"envInfo": "{\"mysql\":[\"MySQL\",\"<p>\\u7248\\u672c\\uff1a<code>MySQL 8.0<\\/code><\\/p>\"],\"mssql\":[\"MS SQL Server\",\"<p>mssql server 2019.<\\/p>\"],\"oraclesql\":[\"Oracle\",\"<p>Oracle Sql 11.2.<\\/p>\"],\"pythondata\":[\"Pandas\",\"<p>Python 3.10 with Pandas 2.2.2 and NumPy 1.26.4<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,