Introduction
Sometimes you want to find data that matches more than one condition at the same time. Compound queries let you ask for documents that meet multiple rules, like finding all users who live in a city and are older than 25.
When you want to find all orders that are both paid and shipped.
When you need to get all users who signed up after a certain date and have a premium account.
When filtering products that are in stock and cost less than a certain amount.
When searching for events that are in a specific location and happening on a specific date.
When you want to combine filters like status and priority in a task list.