You lost me somewhere within the check and 5.
can you try to explain what are you trying to achieve . . .
Sampledata looks identical to this and this but this time a different person (school assignment perhaps?).
Couldn't you just clear out emp1, and then run your working sql?