Rank Scores
<p>Table: <code>Scores</code></p>

<pre>
+-------------+---------+
| Column Name | Type    |
+-------------+---------+
| id          | int     |
| score       | decimal |
+-------------+---------+
id is the primary key (column with unique values) for this table.
Each row of this table contains the score of a game. Score is a floating point value with two decimal places.
</pre>

<p>&nbsp;</p>

<p>Write a solution to find the rank of the scores. The ranking should be calculated according to the following rules:</p>

<ul>
	<li>The scores should be ranked from the highest to the lowest.</li>
	<li>If there is a tie between two scores, both should have the same ranking.</li>
	<li>After a tie, the next ranking number should be the next consecutive integer value. In other words, there should be no holes between ranks.</li>
</ul>

<p>Return the result table ordered by <code>score</code> in descending order.</p>

<p>The result format is in the following example.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre>
<strong>Input:</strong> 
Scores table:
+----+-------+
| id | score |
+----+-------+
| 1  | 3.50  |
| 2  | 3.65  |
| 3  | 4.00  |
| 4  | 3.85  |
| 5  | 4.00  |
| 6  | 3.65  |
+----+-------+
<strong>Output:</strong> 
+-------+------+
| score | rank |
+-------+------+
| 4.00  | 1    |
| 4.00  | 1    |
| 3.85  | 2    |
| 3.65  | 3    |
| 3.65  | 3    |
| 3.50  | 4    |
+-------+------+
</pre>

[]
['Create table If Not Exists Scores (id int, score DECIMAL(3,2))', 'Truncate table Scores', "insert into Scores (id, score) values ('1', '3.5')", "insert into Scores (id, score) values ('2', '3.65')", "insert into Scores (id, score) values ('3', '4.0')", "insert into Scores (id, score) values ('4', '3.85')", "insert into Scores (id, score) values ('5', '4.0')", "insert into Scores (id, score) values ('6', '3.65')"]
[{"value": "mysql", "text": "MySQL", "defaultCode": "# Write your MySQL query statement below\n"}, {"value": "mssql", "text": "MS SQL Server", "defaultCode": "/* Write your T-SQL query statement below */\n"}, {"value": "oraclesql", "text": "Oracle", "defaultCode": "/* Write your PL/SQL query statement below */\n"}, {"value": "pythondata", "text": "Pandas", "defaultCode": "import pandas as pd\n\ndef order_scores(scores: pd.DataFrame) -> pd.DataFrame:\n    "}, {"value": "postgresql", "text": "PostgreSQL", "defaultCode": "-- Write your PostgreSQL query statement below\n"}]
{"mysql": ["Create table If Not Exists Scores (id int, score DECIMAL(3,2))"], "mssql": ["Create table Scores (id int, score DECIMAL(3,2))"], "oraclesql": ["Create table Scores (id int, score DECIMAL(3,2))"], "database": true, "name": "order_scores", "pythondata": ["Scores = pd.DataFrame([], columns=['id', 'score']).astype({'id':'Int64', 'score':'Float64'})"], "manual": false, "postgresql": ["Create table If Not Exists Scores (id int, score DECIMAL(3,2))"], "database_schema": {"Scores": {"id": "INT", "score": "DECIMAL(3, 2)"}}}
{"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.2.2 and NumPy 1.26.4</p>"], "postgresql": ["PostgreSQL", "<p>PostgreSQL 16</p>"]}
['Database']