Forum Discussion

PDRTXRA's avatar
PDRTXRA
Helper I
2 years ago

Model

My goal is to get results from different campaigns.

I have several tables.
Table 1: Campaigns (each one has an unique ID)
Table 2: Segments (each Campaign has several segments. Each segment is identified with an unique ID and can be related to campaigns through campaignID. Each segment has a different offer.)
Table 3: Members (contains all the members for each segment. Each member has an unique ID and can be related to segments through segmentID)
Table 4: Consumptions (contains all transactions from clients that can be or not in any segment).

I need to form a model that can relate the consumptions from table to the members in the campaigns. Not only that, I need to make sure to check only consumptions that are from the offer from the campaign.
For instance:
Campaign A has two segments. Segment A1 and Segment A2.
Segment A1 has 3.000 members and the offer is Product X and Y
Segment A2 has 1.000 members and the offer is Product W and Z.

I want to know how many people in segment A1 purchased product X and Y and how many people in segment A2 bought Product W and Z.

1 Reply