
/* Code Fragments 5.16 When did employees receive raises ? */

SELECT S2.SSN, S2.HISTORY_START_DATE AS RAISE_DATE
FROM SAL_HISTORY AS S1, SAL_HISTORY AS S2
WHERE S2.AMOUNT > S1.AMOUNT
AND S1.SSN = S2.SSN
AND S1.HISTORY_END_DATE = S2.HISTORY_START_DATE
