Or maybe:SELECT T.Region, D.Channel, D.ChanCntFROM table1 T LEFT JOIN ( SELECT D1.Region ,D1.Channel ,D1.ChanCnt ,ROW_NUMBER() OVER (PARTITION BY D1.Region ORDER BY D1.ChanCnt DESC) AS RowNum FROM ( SELECT M.v_region AS Region ,M.Channel ,COUNT(M.CustomerChannel) AS ChanCnt FROM dbo.Master M GROUP BY M.v_region, M.Channel ) D1 ) D ON T.Region = D.Region AND D.RowNum = 1
Difficult to guess without sample data and expected results.