SQL

Identify clients who have not ordered a given product.

Reiss Company has launched two 2 weeks ago a new dress called “Dalia”. The marketing team would like to notify all subscribers who haven’t yet buy Dalia dress yet. In order to get this list of contacts, we have to query the the master customer data extension .

Create the target data extension

Data Extension name: Master Customer

Field namesData TypeLengthPrimary KeyNullable
idText50Yes
emailEmailAddress254TRUE
first_nameText50TRUE
last_nameText50TRUE
dressText50FALSE

SQL query activity

SELECT

email, first_name, last_name, dress

FROM [Master Customer]

WHERE dress != ‘Dalia’

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.
  • WHERE: Enables filtering the data based on specific conditions.
  • !=: Not Equal operator exclude rows that match a specific text value here will be Dalia

Leave a Reply

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