1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-08 08:51:42 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-05-02 23:44:12 +08:00
parent 7ea03594b3
commit 2a71c78585
4790 changed files with 11696 additions and 10944 deletions

View File

@@ -12,7 +12,7 @@
"translatedContent": "<p>表:&nbsp;<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>&nbsp;</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>&nbsp;</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>&nbsp;</p>\n\n<p><strong>进阶:</strong> 如果有多位顾客订单数并列最多,你能找到他们所有的 <code>customer_number</code> 吗?</p>\n",
"isPaidOnly": false,
"difficulty": "Easy",
"likes": 29,
"likes": 42,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
@@ -47,7 +47,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"20.3K\", \"totalSubmission\": \"27.5K\", \"totalAcceptedRaw\": 20257, \"totalSubmissionRaw\": 27522, \"acRate\": \"73.6%\"}",
"stats": "{\"totalAccepted\": \"24.9K\", \"totalSubmission\": \"33.9K\", \"totalAcceptedRaw\": 24887, \"totalSubmissionRaw\": 33914, \"acRate\": \"73.4%\"}",
"hints": [
"MySQL uses a different expression to get the first records other than MSSQL's TOP expression."
],