Thanks a lot for the solution :)
There is a slight modification with the requirement dude.
The number of salaries an employee can have cannot be limited to 3 only.
It can be more or less also.
Say for Sample source data :
Emp_id salary
1 1000
2 2000
2 3000
3 2000
3 4000
3 6000