SQL

Eligible Customers

Reiss Company is planning a promotion for customers who have spent less than £200 in a month. Before finalizing the offer, the marketing team wants to determine the number of customers who match this criteria.

Create the target data extension

Data Extension Details: Master Customer

NameData TypeLengthPrimary KeyNullable
idText50Yes
emailEmailAddress254TRUE
first_nameText50TRUE
last_nameText50TRUE
Total_spend_month
Decimal

18,2
FALSE

SQL query activity

SELECT

COUNT(id) AS eligible_customers

FROM [Master Customer] WHERE Total_spend_month < 200

Explanation

  • SELECT: This clause point out which columns you’d like to see in your target data extension.
  • FROM: This clause point out the table from which you want to pull the data.
  • WHERESet the conditions for the rows you wish to retrieve.
  • <: The less-than operator to filter rows based on a value less than the one specified.

Leave a Reply

Your email address will not be published. Required fields are marked *