I have borrowed a query and adapted it for my own purposes, but I don't like doing this when I am not entirely sure what it is doing. SQL docs are less than descriptive on this clause. Here is what I borrowed and modified, can you tell me what it is doing basically?
(SELECT Id FROM
(
SELECT
Id
,RANK() OVER ( PARTITION BY DropStatusId ORDER BY StatusDate DESC) [Rank]
FROM
[dbo].[tblLHTrackingHistory] [TempHistory]
WHERE
[TempHistory].[DropStatusId] = [DropStatus].[Id]
) [TT1] WHERE [Rank] = 1
)