>There is no alternative to get results of the GROUP BY by other means. However, if you can find cases where extra JOINs are not needed, it may be better to remove them.
Whereas applicable, they are all needed. Otherwise, I wouldn't have put them in there. The GROUP BY is based on conditions. Some conditions are based on INNER JOIN tables.
>Also, perhaps instead of using @Success as variable you may have better results with direct 1 (if, say, you always interested in Success = 1).
Everything has always been parameterized for SQL Server. Why in this case, a direct assignation would be better?