How could this (Oracle) SQL:
select a.*, rank() over (partition by a.field1 order by a.field2 desc) field_rank
from table_a a
order by a.field1, a.field2
be translated into MySQL?
This question seems to be similar but there is no Order By in the end of the base query. Also, does it matter that it is ordered by the fields of partition?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…