Rank Function In Teradata