Нещо такова :D
MERGE INTO MEMB_CREDITS AS target
USING (
SELECT TOP 5 ROW_NUMBER() OVER(ORDER BY SkyEventWins DESC) AS rank_id, AccountID
FROM Character
WHERE SkyEventWins > 0
) AS source
ON target.memb___id = source.AccountID
WHEN MATCHED THEN
UPDATE SET target.credits =...