Query:how to get older date and value
I am trying to develop a query that gives me the current amount assigned to a user/employee and the previous amount/old amount assigned to the employee.
The query so far looks like this:
select distinct p.ELEMENT_ENTRY_ID
,p.EFFECTIVE_START_DATE
,p.EFFECTIVE_END_DATE
,p.LAST_UPDATE_DATE "UPDATE DATE"
,to_char(p.LAST_UPDATE_DATE,'MON') MONTH
,to_char(p.LAST_UPDATE_DATE,'YYYY') YEAR
,p.LAST_UPDATED_BY
,u.USER_NAME "ENTERED BY USERNAME"
,e1.FULL_NAME "ENTERED BY "
,v.EFFECTIVE_START_DATE
,v.EFFECTIVE_END_DATE
,v.SCREEN_ENTRY_VALUE "NEW AMOUNT"