Espero que te sirva de ayuda:
Código SQL:
Ver originalWITH T AS
(SELECT ROW_NUMBER() OVER(Partition BY S1 ORDER BY F1 DESC, D1)-ROW_NUMBER() OVER(Partition BY S1,D1 ORDER BY F1 DESC) Nm,
*
FROM MiTabla)
SELECT MIN(S1) S1,
MIN(I1) I1,
MIN(D1) D1,
MIN(F1) F1
FROM T
GROUP BY Nm
ORDER BY F1 DESC;
Las columnas son S1,I1,D1,F1 respectivamente.