It is best to use row_number for sorting. It ranks in sequence and does not show the same rank, for example, 1, 2, 3, 4, or 5 rank, and skips the same rank number to the next, for example: 1, 1, 3, 4, 5, dense_rank appear in the same ranking, do not skip the same ranking number, such as: 1, 1, 2, 3, 4, ntitle () by the number of groups divided by value, such as: ntitel (3
It is best to use row_number for sorting. It ranks in sequence and does not show the same rank. For example, rank 1, 2, 3, 4, and 5 shows the same rank, and skips the same rank number to the next, for example: 1, 1, 3, 4, 5, dense_rank shows the same ranking, do not skip the same ranking number, such as: 1, 1, 2, 3, 4, ntitle () by the number of groups divided by value, such: ntitel (3
It is best to use row_number for sorting. It ranks in sequence and does not show the same rank, for example, 1, 2, 4, 5.
Rank has the same rank, and skips the next rank with the same rank number, such as, 5,
The same rank appears in dense_rank, and the same rank number is not skipped, such as:, 4,
Ntitle () sorts the number of groups divided by value, such as ntitel (3), and 3 based on: 1, the number of records in each group cannot be greater than the number of records in the previous group.
2. The records in all groups are either the same, or the number of records in all groups starting from a group is the same as the number of records in this group.
Both use with over orderby