How To Implement Scd Type 2 In Sql Query