Wholesaler Transaction Structuring
In this case, there are two sources of data tables which are the Purchase Report and the Sales Report. Both reports are updated monthly. The report structuring solely uses the features in Google BigQuery. The final output are Inventory Report and Margin Report based on the aggregation of Sales and Purchase reports.
The Purchase and Sales reports consist of transaction information such as, product name, price and quantity as shown in the table below. The values are then, aggregated based on each date.
The aggregated table serves as the basis in calculating the margin and stock inventory. Below are the example of margin and inventory calculation for each day.
Margin table:
Inventory table: