Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个查询,它返回一个表,其中包含多个给定日期的值。我希望能够知道每个日期的任何给定结果集,它们的排名是多少。我不能使用简单的排名函数,因为我需要为多个列、多个日期执行此操作。关于我需要什么功能以及如何编写它的任何建议?
select *, @rank := @rank + 1 from your_table, (select @rank := 0) r