When I was writing Leetcode questions today , it was clear that there was no error in the grammar (as shown below), but I kept making mistakes and I was depressed.
select Score,
dense_rank() over(order by Score desc) as Rank
from Scores;
After thinking about it for a long time, it turns out that keywords need to be quoted as column names.
select Score,
dense_rank() over(order by Score desc) as 'Rank'
from Scores;
Just add quotation marks
Attached Mysql common keywords