Prøv dette, ikke 100% sikker på, at syntaksen er rigtig, men den er tæt på.
select
*
from
(select
CON,
OWNER,
METHOD,
MATRIX,
RESULT,
COUNT,
RANK() OVER(PARTITION BY CON, OWNER, METHOD,MATRIX ORDER BY RESULT,COUNT DESC) as rnk
FROM #TempTable
) a
WHERE rnk = 1