1:select a.cell_num,a.cdr_type,row_number() over(partition by cdr_type order by cell_num) from bc_vip_safeguard a
此处row_number() over(partition by cdr_type order by cell_num)表示按照话单类型分组,然后再分组内部按电话号码进行排序
2:select a.cell_num,a.cdr_type,rank() over(partition by cdr_type order by cell_num) from bc_vip_safeguard a
此处rank() over(partition by cdr_type order by cell_num)表示跳跃性排序,有多个第一,下一个直接跳跃到第四
3:select a.cell_num,a.cdr_type,dense_rank() over(partition by cdr_type order by cell_num) from bc_vip_safeguard a
此处dense_rank()over(partition by cdr_type order by cell_num)表示非跳跃性排序,有多个第一,下一个仍然是第二