
/* Code Fragment 5.3 What is Bob's current position and salary ? */

SELECT JOB_TITLE_CODE1, AMOUNT
FROM EMPLOYEES, INCUMBENTS, POSITIONS, SAL_HISTORY
WHERE FIRST_NAME = 'Bob'
AND EMPLOYEES.SSN = INCUMBENTS.SSN
AND INCUMBENTS.PCN = POSITIONS.PCN
AND START_DATE <= GETDATE()
AND GETDATE() < END_DATE
AND HISTORY_START_DATE <= GETDATE()
AND GETDATE() < HISTORY_END_DATE
AND SAL_HISTORY.SSN = EMPLOYEES.SSN
