SQL Query Examples
Example Use Cases
-
Find contacts with more than 5 page hits:
-
At least one email read in the last 12 months:
Returns true if the contact has read at least one email in the past year.Use this as a segment filter or campaign condition to target contacts who have engaged with at least one email in the last 12 months.
-
Check if contact exists in an external table:
-
Update an external table when a campaign step is reached:
-
Find contacts who have not opened any email in the last 6 months:
Use this as a negative segment filter: contacts NOT matching this query have not opened any email in 6 months.
-
Find contacts with at least 3 form submissions:
-
Check if contact is assigned to a specific owner: