• I find the RANK function to be much better used in situations where I might not be able to group by all fields in the select statement. Another way I have used it before is to find not the latest record, but the SECOND latest record by choosing where RANK = 2.

    -------------------------------------------------------------------------------------------------
    My SQL Server Blog