Dynamic SQL Filters

One query. Every filter. Zero SQL exposure.

Query Streams reads the values in your WHERE clause — strings, dates, numbers, IN‑lists — and turns each one into a live control in Excel or Google Sheets. Recipients pick dropdowns and date pickers; the SQL stays hidden and the data stays live.

Free forever tier · No credit card required
Auto-detected controls Write once, filter forever SQL never exposed
The detection engine

Write the SQL. We find the filters.

Every static value in your WHERE clause becomes an interactive control — the right control for its type. Change one and watch it flow straight back into the query. (Illustrative demo — sample data.)

query.sqlQuery Builder · Creator view
SELECT product, region, revenue
FROM sales
WHERE region = 'West'
  AND order_date >= '2025-01-01'
  AND revenue >= 500
  AND status IN ('Paid', 'Shipped')
4 filterable conditions detected
Filters · Excel / Sheets

Recipients only ever touch the controls on the right. They never see the SQL, the table names, or the database credentials — and they can’t change the query’s logic.

Four value types. Four native controls.

Query Streams maps each detected value to the control that fits it — no @variables required, though those work too.

String → Dropdown

Text conditions become a select box — options typed in, or populated live from another query.

region = 'West'

Date → Picker

BETWEEN and >= date conditions turn into calendar pickers for start and end.

order_date >= '2025-01-01'

Number → Input

Numeric comparisons become validated inputs — thresholds, amounts, quantities, with sensible defaults.

revenue >= 500

IN‑list → Multi-select

IN (…) clauses become checkable chips — the list expands and contracts to match the selection.

status IN ('Paid', 'Shipped')

Two ways to make a filter

Let Query Streams auto-detect the values in normal SQL, or name them explicitly with @variables. Mix both in one query.

Auto-detection

Write normal SQL. Toggle which detected values become filters — no special syntax to learn.

auto-detected.sqldetected from literals
SELECT *
FROM orders
WHERE customer = 'ACME'
  AND order_date
      BETWEEN '2025-01-01'
      AND '2025-06-30'

Explicit @variables

Name parameters yourself for full control over labels, defaults and validation. Combine with auto-detection.

parameters.sqlnamed parameters
SELECT *
FROM sales
WHERE region = @region
  AND sale_date >= @start_date
  AND category IN (@categories)

Add filters in three steps

Build it once; everyone else just picks and runs.

01

Write your SQL

Write a query with WHERE conditions. Static values like 'ACME' or '2025-01-01' are detected as filterable parameters automatically.

02

Configure filters

Toggle which detected values become UI controls, and set labels, defaults and dropdown options in the query Properties tab.

03

Users filter on demand

Recipients pick filters and hit Run. Live data streams into Excel or Google Sheets in seconds.

Governance

Filters reshape the query. They never expose it.

A filter only changes which values the query runs with — it can never reveal the SQL behind it. The query text and database credentials stay on your Network Agent; recipients see controls and results, nothing else.

  • Read-only execution by default — only SELECT runs
  • Users cannot edit the SQL logic, only the values you allow
  • Credentials stay encrypted on the agent, inside your network
  • Revoke any person’s access instantly from the web portal
Protected query boundary
SQL text Hidden from recipients
Credentials Encrypted on the agent
Network Outbound-only connection
Execution Read-only by default

Who filters on demand

One saved query, reshaped by everyone who runs it — without any of them touching the database.

Finance

P&L by department or fiscal period. One query filters across every cost center.

Logistics

Inventory by warehouse or SKU, with real-time filtering by location and stock status.

Marketing

Campaign data by channel, date range and region — live results in any spreadsheet.

API data

Stripe, HubSpot and Shopify with date and customer filters via the API Connector.

What are dynamic SQL filters?

A dynamic SQL filter is an interactive parameter that lets a spreadsheet user change WHERE-clause values in a SQL query without editing the SQL itself. Instead of a fixed, unchangeable report, hardcoded conditions become full UI controls — dropdowns, date pickers, number inputs and multi-selects — that each person adjusts on demand to get fresh, filtered results from a live database.

Auto-detection vs. static filters

Traditional approaches need manual parameterization or hardcoded conditions that never change. Query Streams detects the values in your WHERE clause — strings, dates, numbers and IN‑lists — and renders each as the matching control automatically. Write normal SQL; the system finds every filterable condition.

Date-range filters

Conditions like BETWEEN '2025-01-01' AND '2025-06-30' become date-picker controls. Users choose start and end dates from a calendar and the underlying query updates — filter by fiscal quarter, trailing 30 days, or any custom range.

String & numeric filters

Conditions like region = 'West' or amount >= 500 produce dropdowns and numeric inputs — with free-text search, value validation, configurable defaults and option lists populated directly from your database.

IN‑list multi-selects

Clauses like status IN ('Active','Pending') render as multi-select controls. Users check multiple values at once and the IN‑list expands or contracts to match. One query serves everyone; only the filter values change.

Common questions

Do users need database credentials to use filters?

No. The Network Agent handles all database connectivity using credentials that stay encrypted on your network. Users never see connection strings, table names, or SQL — only the filter controls and their results.

What filter types are supported?

Strings render as dropdowns, dates as date pickers, numbers as validated inputs, and IN lists as multi-select controls. Each type is detected automatically from your WHERE clause.

Can I use dropdown lists for filter values?

Yes. Define static dropdown lists in the query Properties tab, or populate them dynamically from another SQL query that returns the allowed values.

Does it also work with @variables?

Yes. Beyond auto-detection, you can use explicit @variable syntax for full control over filter names, types and defaults — and you can mix both approaches in a single query.

Is it secure?

Yes. The agent makes an outbound-only connection — no inbound ports, no VPN — and requests and results travel over that single encrypted channel. SQL is never exposed to users, execution is read-only by default, and you can revoke access instantly from the portal.

Does it work with API Connector queries?

Yes. Dynamic filters work with Stripe, HubSpot, Shopify, Google Analytics 4, ShipStation, Search Console and iTick through the API Connector.

Can multiple users run the same query at once?

Yes. Each user can run the same shared query with different filter values simultaneously, and a single user can launch several into separate worksheet tabs in parallel.

How are dynamic SQL filters different from static reports?

Static reports show fixed data. Dynamic SQL filters let each user adjust parameters — date ranges, regions, product categories — and get fresh, filtered results on demand. The same query serves every user; only the filter values change.

Add filters to any query.

Write the SQL once, expose the filters you choose, and let everyone shape their own results — while the query stays yours.

Free forever tier · No credit card required