# Credit Card Project [2-6]

In previous modules, we looked at the target base for customers who are below 30 years of age.

In this section, we will explore whether we can get a larger target size from other age groups.

Let's first create the customer base for customers who are:

• Women
• Having an income > \$40,000

proc sql;
create table cust_inc40K as
select custno, gender, income, age
from customer_base
where gender = 0 and income > 40000;
quit;

This is similar to what we had done in the previous section, except this time we include customers of all ages.

Now, we will get a sub-segment of customers who have also made at least one purchase in the cosmetic category.

proc sql;
create table tran_5977 as
select distinct custno, MCC
from transaction_table_202001
where MCC = '5977';
quit;

** Women, Cosmetic **;
proc sql;
create table women_tran_5977 as
select a.*, b.MCC
from cust_inc40K a inner join tran_5977 b
on a.custno = b.custno;
quit;

The code above inner joins the cust_inc40K and tran_5977 tables.

The output Women_tran_5977 data set contains customers who are:

• Women having an income > \$40,000 and
• Have made at least one purchase in the cosmetic category

​It has 3,707 customers:

We will now create segments of different age groups:

data women_tran_5977_2;
set women_tran_5977;
length age_c \$15;
if age < 30 then age_c = '1. <30';
else if age < 40 then age_c = '2. 30 -< 40';
else if age < 50 then age_c = '3. 40 -< 50';
else if age < 60 then age_c = '4. 50 -< 60';
else if age >60 then age_c = '5. >60';

run;

proc freq data=women_tran_5977_2;
table age_c;
run

The code above splits the segments into five age groups:

• Group 1. <30
• Group 2. 30 -< 40
• Group 3. 40 -< 50
• Group 4. 50 -< 60
• Group 5. >60

It also computes a frequency count for each group:

​We can see that the majority of this segment falls into group 2 (age between 30 to 40):

There are 2608 customers in this age group. This is a good number for a small marketing promotion.

Now, let's build our first target base data set based on this age group:

data target_base;
set women_tran_5977_2;
where 30 <= age < 40;
run;

The target base data set is created:

Our target base has 2608 customers. However, not all of them will be included in our promotion.

We need to exclude customers who do not want any marketing promotion. In addition, we need to set aside some customers into the control group.

We will go through these steps in the next section.