I am getting the above error message on the below query. anyone with any idea on where I am going wrong? I am using oracle 12.2.1. database. sqL Developer says issue is around the second select statement.
Select e.*,j.*,
Case when prev_JOB_NAME <> JOB_NAME and prev_e.NUMBER <> e.NUMBER
Then 'Changed'
Else 'Not changed'
end as result1
(Select e.*, j.*,
Lag(j.JOB_NAME)
over (partition by e.CAN_NUM, e.P_NUMBER
Order by e.DT) as prev_JOB_NAME
Lag(e.NUMBER)
over (partition by e.PI_CANDIDATE_NUM, e.P_NUMBER
Order by e.DT) as prev.NUMBER
From temp_F e,
temp_D j) e,j