I am working with oracle database and is stuck at this query, I am not comprehending how this is working, i have removed all the unnecssesary information and the query has come down to this:
select RANK () OVER (PARTITION BY A_pk ORDER BY B_pk DESC) as column from Table_C
Can some one explain how is this working?
Partition the table into "windows" based on values in the column
A_pk
:Order each "window" by
B_pk desc
:return the rank of each row (the "place" it's in), by window: