Flow Zone Reference : [Sales and Marketing By Parent Account](flow_zone:MCB4Vti)

Before joining the outreach, sales, and account information together, we need to aggregate the data to the parent account, since that is the level at which we have sales data. 

![Screen Shot 2022-01-11 at 6.42.01 PM.png](xvmFDOwugoXn)

To do so, the sales and marketing datasets are grouped by parent account, product id, year, and week level.  For the account information, we do not need a year/week aggregation since this is static information. These grouped data are found in [Weekly_Sales](dataset:Weekly_Sales), [Weekly_Outreach](dataset: Weekly_Outreach) and [Hospital_Features](dataset:Hospital_Features).

After grouping the data, we run a left join - this time adding all available marketing outreach to the more complete sales dataset. Additionally, the hospital information is added in as additional features for each parent account.

With this complete, we can move into the final feature engineering phase.


