rank(var)

Takes as input a numeric or string variable, and returns an integer column containing the rank order of the values in the input variable; that is, rank of the smallest value in the input is 1, rank of the next-smallest value in the input is 2, etc. If two or more values in the input variable are identical, their rank is also identical.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.