The last section explained several very useful techniques of data exploration. In our real-world example, we explored the data and decided that we need to transform it before we continue working with it. In this section, we will make all desired transformations. The most comfortable way of making transformations is to use T-SQL, because all transformations that we need are rather straightforward.
The first of the transformations is just a join of both source tables. This will eliminate records from the SourceData.Actions table that do not have contracts, and it will also create a base for further analytical datasets. The following statement joins both tables together:
select
contracts.PhoneId
, contracts.IsCorporate
, contracts.CitySize
, actions.ActionRoute
, actions.DateAndTime
, actions.Units
, actions.Unit
, actions.RecomputeUnits...