Getting Started
Contact Lists, Segments, and Imports
Segments
How to Create Segments
How to Exclude a Subset of Contacts While Using Multiple Filters
What is the "Subscribers Who Have Open Tracking Disabled" Segment?
What are Segments?
How to Merge Multiple Genre Segments
Contact Lists
Imports
Email Campaigns
Email Campaign Tips and Tricks
How to Track Subscribers Who Clicked a Specific Link
How HSTS Can Break Links in Hive
How to Use Both AND and OR Conditions When Targeting Users
How to Set Default Merge Tag Values
Why Emails Show Different in Some Clients
How to Include a PDF in Your Template
How to Add a GIF to Your Template
How Open Rates Are Calculated
How to Add "View Email in Browser" URL to Template
Creating Templates
Features for Events
Features for eCommerce
How Does the Abandoned Orders Block Work?
How to Use the Shopify Product Details Block
How to Add a Discount Code to Your Emails
How Does the Recommended Product Block Work?
How to Copy a Template to Another Brand
The Guide to Merge Tags
Email Preview Text
Best Sizes for Backgrounds, Images, and Banners
How to Use the Content Block
How to Create an A/B Test Campaign
Email Deliverability
SMS Campaigns
Events
Automations
How to Setup an SMS Automation
How to Create a Winback Automation
How to Create a Thank You Automation
How to Customize a Pre-Built Welcome Automation
How to Customize the Pre-Built Winback Automation
How to Use Splits in Automations
Pre/Post Event Reminder Setup
How to Use Hive's Prebuilt Automations
How to Setup a Keyword SMS Auto Response Automation
How to Add Users to a Segment From an Email Automation
Can Subscribers Opt-In By Texting My Hive Phone Number?
How to Create a Welcome Automation
How to Create a Browse Abandonment Automation
Signup Forms, Contests, and Capture Apps
Integrations
How to Integrate Magento with Hive
How to Integrate Zapier With Hive
Integrate Squarespace with Hive
Integrating Hive With Google Forms
Using the Eventbrite Integration
Using Hive's Smile.io Integration
How to Integrate With Shortstack in Hive
Integrating Privy With Hive
How to Connect Big Commerce
How to Find Your Facebook Pixel
Reporting
- All Categories
- Email Campaigns
- Email Campaign Tips and Tricks
- How to Use Both AND and OR Conditions When Targeting Users
How to Use Both AND and OR Conditions When Targeting Users
Updated by Bailey Lawson
What is a Nested Query?
If you're looking to send a campaign using both AND and OR between filters, this is called a nested query. For example, sending a campaign to:
Segment A AND (Segment B OR Segment C)
In Hive, you can only have either AND or OR between each filter. But there is a way in Hive to build a nested query to get the results you're looking for. This article will use the above example of Segment A AND (Segment B OR Segment C).
- On your Segments page, click + New Segment button.
- On the Create Segment page, type in your Segment Name.
- Select Live Segment if you want your segment to automatically update if new subscribers meet the requirements of the filter.
- Select Static Segment if you only want to capture the subscribers that meet the requirements of the filters at this point in time.
- Select the filters that will have "OR" in between them. Then click Save Segment.
Building Your Email Campaign
- In the Choose Recipients step of the email campaign builder, select the Segment filters for users who are in Segment A AND users who are in Segment B Or C