Dataset Queries

Filter, aggregate, and shape data from your Scoop datasets

Dataset queries let you extract, filter, and transform data from your Scoop datasets. Use them when blending datasets, pulling data into Google Sheets, or creating aggregated views of your data.

Where Queries Are Used

ContextPurpose
Blending DatasetsDefine source data for each input
Google Sheets PluginPull live data into spreadsheets
Aggregated DatasetsCreate summarized views

Query Configuration

Basic Options

Date Range

Control the time period of data returned:

OptionBehaviorBest For
Use latest snapshotOnly the most recent snapshotCurrent-state analysis
Start dateAll data from date forwardHistorical analysis
All dataEverything in datasetComplete exports
💡

Snapshot datasets: "Use latest snapshot" gives you point-in-time state, while a date range gives you historical snapshots.

Dataset Source

Select which dataset and table to query:

  1. Dataset — The Scoop dataset to pull from
  2. Table — If dataset has multiple tables, select which one

Column Selection

Check the columns you want in your query results. Only selected columns appear in the output.

Tips:

  • Select only needed columns for better performance
  • Include key columns for blending
  • Deselect sensitive columns for sharing

Column Filters

Click the filter icon next to any column to add conditions:

Filter TypeExample
EqualsStage = "Closed Won"
Not equalsStatus ≠ "Cancelled"
ContainsName contains "Corp"
Greater/Less thanAmount > 10000
In listRegion in (West, East)
Date rangeCreated after 2024-01-01

Multiple filters combine with AND logic.

Advanced Options

Click Advanced to access additional query capabilities:

Date to Group By

By default, Scoop uses the load date (when data was ingested). Switch to a business date in your data for more meaningful analysis.

Date TypeExampleUse When
Load dateWhen CSV was uploadedTracking data freshness
Close dateWhen deal closedRevenue by close period
Created dateWhen record createdVolume over time
Custom dateAny date columnDomain-specific analysis

See Intelligent Date Handling for details.

Aggregation

Aggregate by Selected Attributes

When enabled, numbers are summed and grouped by selected text columns:

Example: Sales data with Rep, Region, Amount

Without AggregationWith Aggregation
Row-by-row detailTotals by Rep + Region
10,000 rows50 rows
Individual transactionsGrouped summaries

Why aggregate?

  • Reduce data volume for blending
  • Match aggregation levels between datasets
  • Create summary views

Aggregate by Time Period

Control the time granularity of aggregated data:

PeriodResult
DailyOne row per day
WeeklyOne row per week
MonthlyOne row per month
QuarterlyOne row per quarter
AnnualOne row per year

Example: Daily transactions → Monthly totals

Data Retrieval Mode

For snapshot datasets, choose what data to retrieve:

ModeReturnsUse For
SnapshotsPoint-in-time statesCurrent state analysis
ChangesDetected transitionsChange analysis, process flows

Changes mode returns:

  • What value changed (column)
  • From what value
  • To what value
  • When the change occurred

Useful for detailed lifecycle analysis without building custom queries.

Query Examples

Simple Filter Query

Goal: Get all closed-won deals from Q4

Configuration:

  • Date range: 2024-10-01 to 2024-12-31
  • Columns: Deal ID, Name, Amount, Rep
  • Filter: Stage = "Closed Won"

Aggregated Summary

Goal: Monthly revenue by region

Configuration:

  • Columns: Region, Amount
  • Aggregate by: Region
  • Time period: Monthly
  • Date: Close Date

Result: One row per region per month with total amount

Change Analysis

Goal: Track deal stage changes

Configuration:

  • Data retrieval: Changes
  • Columns: Deal ID, Stage, Change Date
  • Filter: Stage column changes

Result: Every stage transition with before/after values

Blending Preparation

Goal: Summarize support tickets by account for blending with CRM

Configuration:

  • Columns: Account ID, Ticket Count, Avg Resolution Time
  • Aggregate by: Account ID
  • Time period: Monthly

Result: One row per account with ticket metrics, ready to blend with CRM account data

Filter Syntax Reference

Text Filters

ConditionSyntax
Equals= "value"
Not equals≠ "value"
Containscontains "text"
Starts withstarts with "text"
Ends withends with "text"
Is emptyis empty
Is not emptyis not empty

Numeric Filters

ConditionSyntax
Equals= 100
Greater than> 100
Less than< 100
Between100 to 500
Is emptyis empty

Date Filters

ConditionSyntax
After> 2024-01-01
Before< 2024-12-31
Between2024-01-01 to 2024-06-30
This monththis month
Last 30 dayslast 30 days

Best Practices

Performance

  • Filter data as early as possible
  • Select only needed columns
  • Use aggregation to reduce row counts
  • Choose appropriate date ranges

Data Quality

  • Verify filters return expected results
  • Test with preview before processing
  • Check for NULL handling in filters

Maintainability

  • Use consistent date column choices
  • Document complex filter logic
  • Name blended datasets descriptively

Troubleshooting

No Data Returned

Causes:

  • Filters too restrictive
  • Date range doesn't contain data
  • Wrong table selected

Solutions:

  1. Remove filters and verify base data exists
  2. Expand date range
  3. Check table selection

Too Much Data

Causes:

  • Aggregation not enabled
  • Too wide date range
  • Missing filters

Solutions:

  1. Enable aggregation by attributes
  2. Narrow date range
  3. Add appropriate filters

Wrong Aggregation

Causes:

  • Wrong date column selected
  • Missing grouping columns
  • Incorrect time period

Solutions:

  1. Verify date column choice
  2. Select all needed attribute columns
  3. Adjust time period granularity

Related Topics