-(ROW_NUMBER() OVER ()) AS descending
(note “-“ in front)
I don't have a base column to use for "order by,"
I think that’s the main issue: what (semantically) does row_number() mean in that case? You could equally well generate random numbers?
--//--
What I want to do is inverse the enumeration using a simple solution. I want to look at the enumeration of the dataset list from bottom to top, not from top to bottom. I don't want to reverse the sign of the integers. The generated integers in output remain positive.The returned dataset can be from any query. What I need is exactly the opposite of row_number().
count(*) over() - row_number() + 1 works.
But I think for a large volume of data, its performance will be inferior to the suggested row_number_desc() over(). I may be very wrong, so I will test it.
Maiquel.