
column_i_want_to_rank
- this is the column that you want to rankASC
andDESC
- if you want to have the biggest values with rank = 1, then you need to addDESC
to yourORDER BY
clause. If you want the smallest values with rank = 1 then you can addASC
to yourORDER BY
clause (this isn’t required, since the ordering isASC
by default).