Вот один из способов решения вашей проблемы:
CREATE TABLE #T (ClientID INT, RATING VARCHAR (20), eff_From DATE)
INSERT INTO #T VALUES
(111, 'high', '20180930' ),
(111, 'high', '20180630' ) ,
(111, 'medium', '20180331' ) ,
(111, 'high', '20171231' ) ,
(111, 'high', '20170930' ) ,
(111, 'low', '20170630' );
WITH CTE AS
(
SELECT *, ROW_NUMBER() OVER (PARTITION BY ClientID ORDER BY eff_From) AS RowNumb
FROM #T
)
SELECT C.*,
C2.RATING AS C2Rating,
C2.eff_From AS C2EffFrom,
CASE WHEN C.RATING <> C2.RATING THEN 1 ELSE 0 END AS RatingChanged
INTO #T2
FROM CTE AS C
LEFT JOIN CTE AS C2 ON C.RowNumb = C2.RowNumb - 1
SELECT ClientID, MAX (C2EffFrom) AS MaxEffFrom
FROM #T2
WHERE RatingChanged = 1
GROUP BY ClientID