Select t.* from (select a. *, Row_number () over (partition by required to group fields order by update time desc) RW from table a) t = 1
Row_number () over (partition by col1 ORDER by col2) indicates that, according to col1 grouping, sorting is based on col2 within the grouping, and the value computed by this function represents the sequential number of each set of internally ordered (contiguous unique within the group).
The difference with rownum is that when sorting with rownum, the result set is first added to a fake rownum and then sorted, and this function sorts and then calculates the line number after it contains the sort clause.
Row_number () is about the same as rownum, which is a bit more powerful (it can be sorted from 1 within each grouping).
Rank () is a jumping sort, with two second names followed by fourth (also within each group)
Dense_rank () is also a sequential sort, with two second names still followed by third place. In contrast, Row_number does not have duplicate values.
Oracle analytic function row_number (), returns an integer value (>=1);
Turn and turn--oracle and sort by time to take the first one