Deloitte interview question

Explain about SCDType2, and write logic for merge.