Review the following Operator reference information to help you create accurate SQL code for your conditions.
equal to
Use the equal to operator when you want to include profiles that are exactly equal to the selected value.
Example
Match all profiles in which the gender is Female.
SQL Example
Code Block | ||
---|---|---|
| ||
select count(*) from (
select
a."cdp_customer_id"
from "cdp_audience_1249"."customers" a
where a."gender" = 'Female'
-- set session distributed_join = 'true'
) cs |
Operator | Include Profiles where the selected attribute is | Example Use Case | SQL Example |
equal to | exactly equal to the selected value | match all profiles in which the gender is Female | select count(*) from ( |
not equal to | not equal to the selected value | match all profiles in which gender is not Male | select count(*) from ( |
greater than | greater than the selected value | match all profiles with a likely_to_shop score greater than zero | select count(*) from ( |
greater than or equal to | greater than or equal to the selected value | match all profiles with a likely_to_shop score greater than OR equal to zero. | select count(*) from ( |
less than | less than the selected value | match all profiles with a likely_to_shop score less than 10. | select count(*) from ( |
less than or equal to | less than or equal to the selected value | match all profiles with a likely_to_shop score less or equal to 10. | select count(*) from ( |
contains | contains the selected value | match all profiles where the company contains Johnston LLC. | select count(*) from ( |
starts with | begins with the selected value | match all profiles where the company begins with Johnston LLC. | select count(*) from ( |
ends with | ends with the selected value | match all profiles where the company ends with Johnston LLC | select count(*) from ( |
regex | matches based on a regular expressions pattern (regex). You must provide the regex pattern that works for your use case. | match all profiles where the job_title begins with 'Manager', based on the regex expression: ^Manager. | select count(*) from ( |
not regex | does NOT match based on a regular expressions pattern (regex). You must provide the regex pattern that works for your use case. | match all profiles where the company does not end with the word google based on the regex pattern google$. | select count(*) from ( |
is between | between two provided values | match all profiles with a likely_to_shop score between 10 and 20. | select count(*) from ( |
does not contain | does not contain the selected value | include all profiles where the company does not contain Johnston LLC. | select count(*) from ( |
does not start with | does not begin with the selected value | include all profiles where company does not start with Johnston LLC | select count(*) from ( |
does not end with | does not end with the selected value | include all profiles where the last_name does not end with Saint John. | select count(*) from ( |
is one of | one of the selected options | include all profiles where the job_title is either 'VP Marketing' or 'VP sales' or 'VP Product Management'. | select count(*) from ( |
is not one of | not one of the selected options | include all profiles where the job_title is NOT Teacher or Physical Therapist or Chemical Engineer. | select count(*) from ( |
is not between | not between the selected values | include all profiles where the likely_to_shop_score is not between 31 and 40. | select count(*) from ( |
exists | where the selected attribute exists | match all profiles that have an affinity_sub_category score. | select count(*) from ( |
does not exist | does not exist | match all profiles that do not have a td_ip_city_postal_code value. | select count(*) from ( |
does not exist or greater than | does not exist or is greater than a certain value | match all profiles that do not have a td_ip_city_postal_code_value or have a td_ip_city_postal_code_valuegreater than 94119. | select count(*) from ( |
does not exist or greater than or equal to | does not exist or is greater than or equal to a certain value | match all profiles that do not have a td_ip_city_postal_code_value or have a td_ip_city_postal_code_valuegreater than or equal to 94119 | select count(*) from ( |
does not exist or less than | does not exist or is less than a certain value | match all profiles that do not have a td_ip_city_postal_code_value or have a td_ip_city_postal_code_value less than 94119 | select count(*) from ( |
does not exist or less than or equal to | does not exist or is less than or equal to a certain value | match all profiles that do not have a td_ip_city_postal_code_value or have a td_ip_city_postal_code_value less than or equal to 94119. | select count(*) from ( |
...