mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-05 15:31:43 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>表: <code>Orders</code></p>\n\n<pre>\n+-----------------+----------+\n| Column Name | Type |\n+-----------------+----------+\n| order_number | int |\n| customer_number | int |\n+-----------------+----------+\nOrder_number是该表的主键。\n此表包含关于订单ID和客户ID的信息。\n</pre>\n\n<p> </p>\n\n<p>编写一个SQL查询,为下了 <strong>最多订单</strong> 的客户查找 <code>customer_number</code> 。</p>\n\n<p>测试用例生成后, <strong>恰好有一个客户</strong> 比任何其他客户下了更多的订单。</p>\n\n<p>查询结果格式如下所示。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong> \nOrders 表:\n+--------------+-----------------+\n| order_number | customer_number |\n+--------------+-----------------+\n| 1 | 1 |\n| 2 | 2 |\n| 3 | 3 |\n| 4 | 3 |\n+--------------+-----------------+\n<strong>输出:</strong> \n+-----------------+\n| customer_number |\n+-----------------+\n| 3 |\n+-----------------+\n<strong>解释:</strong> \ncustomer_number 为 '3' 的顾客有两个订单,比顾客 '1' 或者 '2' 都要多,因为他们只有一个订单。\n所以结果是该顾客的 customer_number ,也就是 3 。\n</pre>\n\n<p> </p>\n\n<p><strong>进阶:</strong> 如果有多位顾客订单数并列最多,你能找到他们所有的 <code>customer_number</code> 吗?</p>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 28,
|
||||
"likes": 29,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -47,7 +47,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"20K\", \"totalSubmission\": \"27.1K\", \"totalAcceptedRaw\": 19974, \"totalSubmissionRaw\": 27091, \"acRate\": \"73.7%\"}",
|
||||
"stats": "{\"totalAccepted\": \"20.3K\", \"totalSubmission\": \"27.5K\", \"totalAcceptedRaw\": 20257, \"totalSubmissionRaw\": 27522, \"acRate\": \"73.6%\"}",
|
||||
"hints": [
|
||||
"MySQL uses a different expression to get the first records other than MSSQL's TOP expression."
|
||||
],
|
||||
|
Reference in New Issue
Block a user