Difference ROW_NUMBER Vs RANK functions in Teradata

ROW_NUMBER will apply the numbers serially to the result set where RANK function will give the same priority to the same rows. RANK resembles the general ranking function. If two people get 2nd rank, the next person will get 4th rank since 3rd rank will be neglected by ranking principle.

Consider the table below:
NAMESUB1SUB2SUB3
Ria455487
Robert454467
Joel854067
Roshan459467
Joldrine454497


ROW_NUMBER:
SELECT
NAME
,SUM(SUB1 + SUB2 + SUB3) AS TOTAL_MARKS
,ROW_NUMBER() OVER (ORDER BY TOTAL_MARKS DESC ) AS STUDENT_ROWNUM
FROM STUDENT
GROUP BY 1;


Output from ROW_NUMBER:
NAMETOTAL_MARKSSTUDENT_ROWNUM
Roshan2061
Joel1922
Ria1863
Joldrine1864
Robert1565



RANK:
SELECT
NAME
,SUM(SUB1 + SUB2 + SUB3) AS TOTAL_MARKS
,RANK() OVER (ORDER BY TOTAL_MARKS DESC ) AS STUDENT_RANK
FROM STUDENT
GROUP BY 1;


Output from RANK:
NAMETOTAL_MARKSSTUDENT_RANK
Roshan2061
Joel1922
Joldrine1863
Ria1863
Robert1565