---
schema_version: "1"
id: 5eee0c4f5a7832da389d66447111f7db5b5730d69d6a3aa2f54e4f53b80eefd3
title: Queries in Clean Rooms
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/data/264-0-0/c360_a_crc_queries_in_clean_rooms.md
canonical_url: https://help.salesforce.com/s/articleView?id=data.c360_a_crc_queries_in_clean_rooms.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 7d774b7b9898b9823d8a0219177afc382f64e07ad3b2b67610bccbf180009531
description: Run queries in a clean room to compare your data with a collaborator's data and gain insights, without exposing raw records.
products:
  - Data 360
release: "264"
---
# Queries in Clean Rooms

Run queries in a clean room to compare your data with a collaborator's data and gain insights, without exposing raw records.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col style="width:100%"></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise Editions</strong></td></tr></tbody></table>

Query results vary based on the use case of the collaboration.

## How Queries Work in a Collaboration

A collaboration is based on a use case. When a use case includes more than one query, every query in the use case is available in the collaboration, and you select which query to run. A query compares a consumer segment with the provider's data and returns a result that meets the privacy rules that the template defines.

Run a query in two ways.

Manual run

Run the query ad hoc and get a result for the segment that you select.

Scheduled run based on segment publish

Schedule the query to run each time its consumer segment publishes. The query follows the segment's existing publish schedule, so the result refreshes on the same cadence as the segment.

To schedule a query on segment publish, the consumer segment needs a publish schedule. If the segment doesn't have a publish schedule, an associated query runs ad hoc only.

When a use case includes more than one query, schedule each query to run on the segment publish schedule. The queries share the same publish trigger but produce separate results. Data 360 prevents a duplicate schedule for the same combination of query, segment, and parameter values, so you can't create the same schedule twice.

Scheduling a query doesn't remove the ad hoc option. Run a scheduled query manually on demand — a manual run doesn't change the schedule.

![Run and Schedule Queries for a Campaign](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-data-data_cloud-264-0-0-production-enus/f3569962-3c9b-4f83-9d0c-b6a574e785da/images/icon_example.png)

Run and Schedule Queries for a Campaign

A marketing team (consumer) collaborates with a publisher (provider) on a use case that includes two queries: an audience overlap query and a reach summary query. Because the use case has multiple queries, both are available in the collaboration, and the team chooses which one to run.

The team schedules the overlap query to run on segment publish for their Loyalty Members segment, which publishes every week. Each time the segment publishes, the query reruns automatically, so the team always has a current overlap count without running the query by hand.

Midweek, the team starts a promotion and needs current numbers before the next scheduled run. They run the overlap query for the same segment. The manual run returns an immediate result and doesn't change the weekly schedule. Later, they run the reach summary query to check the performance of the promotion.

## Next Steps

Continue with these related tasks.

- To run a query now or schedule one, see [Collaborate in a Clean Room](https://help.salesforce.com/s/articleView?id=data.c360_a_crc_collaborate_in_clean_room.htm&release=264.0.0&type=5 "Set up a query in a Data 360 clean room collaboration to compare a consumer segment with the provider's data, without exposing raw records. Run a query manually for an immediate output, or schedule it to run each time the segment publishes.").
- To stop a run that's in progress, see [Cancel a Query Run](https://help.salesforce.com/s/articleView?id=data.c360_a_crc_cancel_a_query_run.htm&release=264.0.0&type=5 "Cancel a query run that's in progress when you no longer need the result or you started the run by mistake.").
- To find query output and reports, see [View Clean Room Query Results](https://help.salesforce.com/s/articleView?id=data.c360_a_crc_view_clean_room_query_results.htm&release=264.0.0&type=5 "Check the latest output for a clean room query whenever a manual or scheduled run completes.").
- To review or delete your scheduled queries, see [Manage Scheduled Queries](https://help.salesforce.com/s/articleView?id=data.c360_a_crc_manage_scheduled_queries.htm&release=264.0.0&type=5 "Review the queries scheduled to run on segment publish in a collaboration, check their status, and delete a schedule that you no longer need.").