Rank And Dense Rank Functions