1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-05 15:31:43 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-03-29 16:56:27 +08:00
parent e730aa6794
commit ad15da05aa
2517 changed files with 7358 additions and 7332 deletions

View File

@@ -12,7 +12,7 @@
"translatedContent": "<p>表:&nbsp;<code>Scores</code></p>\n\n<pre>\n+-------------+---------+\n| Column Name | Type |\n+-------------+---------+\n| id | int |\n| score | decimal |\n+-------------+---------+\nId是该表的主键。\n该表的每一行都包含了一场比赛的分数。Score是一个有两位小数点的浮点值。\n</pre>\n\n<p>&nbsp;</p>\n\n<p>编写 SQL 查询对分数进行排序。排名按以下规则计算:</p>\n\n<ul>\n\t<li>分数应按从高到低排列。</li>\n\t<li>如果两个分数相等,那么两个分数的排名应该相同。</li>\n\t<li>在排名相同的分数后,排名数应该是下一个连续的整数。换句话说,排名之间不应该有空缺的数字。</li>\n</ul>\n\n<p>按&nbsp;<code>score</code>&nbsp;降序返回结果表。</p>\n\n<p>查询结果格式如下所示。</p>\n\n<p>&nbsp;</p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong> \nScores 表:\n+----+-------+\n| id | score |\n+----+-------+\n| 1 | 3.50 |\n| 2 | 3.65 |\n| 3 | 4.00 |\n| 4 | 3.85 |\n| 5 | 4.00 |\n| 6 | 3.65 |\n+----+-------+\n<strong>输出:</strong> \n+-------+------+\n| score | rank |\n+-------+------+\n| 4.00 | 1 |\n| 4.00 | 1 |\n| 3.85 | 2 |\n| 3.65 | 3 |\n| 3.65 | 3 |\n| 3.50 | 4 |\n+-------+------+</pre>\n",
"isPaidOnly": false,
"difficulty": "Medium",
"likes": 907,
"likes": 908,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
@@ -47,7 +47,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"143.5K\", \"totalSubmission\": \"237.6K\", \"totalAcceptedRaw\": 143475, \"totalSubmissionRaw\": 237605, \"acRate\": \"60.4%\"}",
"stats": "{\"totalAccepted\": \"143.8K\", \"totalSubmission\": \"238.3K\", \"totalAcceptedRaw\": 143849, \"totalSubmissionRaw\": 238251, \"acRate\": \"60.4%\"}",
"hints": [],
"solution": null,
"status": null,