• Here's a set of methods on how you can deal with versioned data. Instead of a GROUP BY, I'd suggest using a TOP 1 with an ORDER BY. That's generally going to result in superior performance.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning