On Tuesday, January 16, 2024, Maiquel Grassi <gra...@hotmail.com.br> wrote:

> Hi developers,
>
> I was working on loans and bank financing, specifically focusing on
> Amortization Systems. I had the need to reverse the counter for the total
> number of installments or for a specific set of installments. This
> "reversal" is essentially a reverse "row_number" function. I realized that
> it is to "hard work" to write PL/foo functions for this or even to
> implement it in just SQL using little code.
>

I think “row_number() over (order by … desc)”  is a sufficient way to get
this behavior and this isn’t something useful enough to warrant being the
first ordering-specific function in the system.

David J.

Reply via email to