Skip to main content

Overview

Filters let you narrow down data to specific segments. Cryptique provides a visual query builder with AND/OR logic and type-specific operators for precise filtering.

Filter Types

You can filter by five categories:
Filter TypeDescriptionExample
Event FiltersFilter by event name and propertiesEvents where event_name = "swap_completed"
User Profile FiltersFilter by user propertiesUsers where plan = "pro"
Transaction FiltersFilter on-chain transactionsTransactions where chain = "ethereum"
Time FiltersFilter by date/time rangesEvents in last 30 days
Cohort FiltersFilter by cohort membershipUsers in "Power Users" cohort

Query Builder

Cryptique uses a visual query builder with AND/OR logic:
Filter where:
├── event_name = "swap_completed"
├── AND chain = "ethereum"
└── OR (
    ├── amount_usd > 1000
    └── AND user_tier = "whale"
)
Combine conditions with:
  • AND: All conditions must be true
  • OR: At least one condition must be true
  • Grouping: Nest conditions for complex logic

String Operators

For text properties like country, browser_name, event_name:
OperatorDescriptionExample
isExact matchcountry is "US"
is_notDoes not equalcountry is_not "US"
containsContains substringemail contains "@gmail"
does_not_containDoes not contain substringemail does_not_contain "test"
is_setProperty has any valueemail is_set
is_not_setProperty has no valueemail is_not_set

String Examples

# Exact match
country is "United States"

# Exclude specific value
browser_name is_not "Safari"

# Partial match
current_url contains "/swap"
page_title contains "Dashboard"

# Check existence
wallet_address is_set      # Only Web3 users
email is_not_set           # Anonymous users

Number Operators

For numeric properties like amount_usd, transaction_count, session_duration:
OperatorDescriptionExample
equalEqualsamount equal 100
not_equalDoes not equalamount not_equal 0
greater_thanGreater thanamount greater_than 100
greater_than_equalGreater than or equalamount greater_than_equal 100
less_thanLess thanamount less_than 1000
less_than_equalLess than or equalamount less_than_equal 1000
betweenIn range (inclusive)amount between 100 and 1000
not_betweenOutside rangeamount not_between 100 and 1000
is_numericHas a numeric valueprice is_numeric
is_not_numericNot a number (null/NaN)price is_not_numeric

Number Examples

# Exact value
transaction_count equal 0          # Users with no transactions

# Comparisons
amount_usd greater_than 1000       # High-value transactions
gas_used less_than 100000          # Low gas transactions

# Range filtering
amount_usd between 100 and 10000   # Mid-tier transactions
session_duration not_between 0 and 10  # Exclude bounces

# Existence checks
token_balance is_numeric           # Has balance data

Boolean Operators

For true/false properties like is_web3_user, has_completed_onboarding:
OperatorDescriptionExample
is_trueProperty is trueis_web3_user is_true
is_falseProperty is falseis_web3_user is_false

Boolean Examples

# Web3 users only
is_web3_user is_true

# Traditional Web2 users
is_web3_user is_false

# Custom boolean properties
has_completed_onboarding is_true
is_verified is_false

Datetime Operators

For date/time properties like timestamp, created_at, last_seen:
OperatorDescriptionExample
lastWithin the last N days/hourstimestamp last 7 days
not_in_the_lastNot within the last N daystimestamp not_in_the_last 7 days
betweenBetween two datestimestamp between Jan 1 and Jan 31
not_betweenOutside date rangetimestamp not_between Jan 1 and Jan 31
onOn specific datetimestamp on Jan 15
not_onNot on specific datetimestamp not_on Jan 1
before_the_lastBefore the last N daystimestamp before_the_last 30 days
beforeBefore specific datetimestamp before Jan 1, 2024
sinceSince specific datetimestamp since Jan 1, 2024
in_the_nextWithin the next N daysexpiry_date in_the_next 7 days

Datetime Examples

# Relative time filters
timestamp last 30 days             # Last month's activity
timestamp last 24 hours            # Today's events
created_at not_in_the_last 90 days # Older users only

# Date range
timestamp between "2024-01-01" and "2024-01-31"
timestamp not_between "2024-12-24" and "2024-12-26"  # Exclude holidays

# Specific date
timestamp on "2024-01-15"          # Single day
timestamp not_on "2024-01-01"      # Exclude New Year

# Before/after
timestamp before "2024-06-01"      # Before June
timestamp since "2024-01-01"       # This year only
first_seen before_the_last 365 days  # Users over a year old

# Future dates (for expiry, subscription end, etc.)
subscription_end in_the_next 30 days  # Expiring soon

List Operators

For array properties like chains_used, tokens_held, tags:
OperatorDescriptionExample
any_in_listAny item matcheschains_used any_in_list ["ethereum", "polygon"]
all_in_listAll items matchrequired_tags all_in_list ["verified", "active"]
List operators can be combined with nested operators based on item type:

List with String Items

# Any chain is ethereum OR polygon
chains_used any_in_list where item is "ethereum" OR item is "polygon"

# User has used any EVM chain
chains_used any_in_list where item contains "evm"

# All tags must be from approved list
tags all_in_list where item is "verified" OR item is "premium"

List with Number Items

# Any transaction over $1000
transaction_amounts any_in_list where item greater_than 1000

# All balances are positive
token_balances all_in_list where item greater_than 0

Filter Combinations

AND Logic

All conditions must be true:
Events where:
├── event_name is "swap_completed"
├── AND chain is "ethereum"
├── AND amount_usd greater_than 100
└── AND timestamp last 7 days

→ Only Ethereum swaps over $100 in the last week

OR Logic

At least one condition must be true:
Users where:
├── plan is "pro"
└── OR total_transactions greater_than 100

→ Pro users OR users with 100+ transactions

Nested Groups

Combine AND/OR with grouping:
Events where:
├── event_name is "swap_completed"
└── AND (
    ├── chain is "ethereum"
    └── OR chain is "arbitrum"
)
└── AND (
    ├── amount_usd greater_than 1000
    └── OR user_tier is "whale"
)

→ Swaps on Ethereum or Arbitrum that are either 
   high-value ($1000+) or from whale users

Event Filters

Filter events by name and properties:
Events:
├── event_name is "swap_completed"
├── Properties:
│   ├── input_token is "ETH"
│   ├── AND output_token is "USDC"
│   └── AND slippage less_than 1

Common Event Filters

FilterUse Case
event_name is "wallet_connect"Only wallet connections
event_category is "transaction"Only transaction events
custom_properties.campaign is "summer"Campaign-specific events

User Profile Filters

Filter by user attributes:
Users:
├── plan is "pro"
├── AND country is "US"
├── AND is_web3_user is_true
└── AND wallet_address is_set

Common User Filters

FilterUse Case
is_web3_user is_trueWeb3 users only
first_seen last 30 daysNew users
session_count greater_than 10Engaged users
wallet_address is_setUsers with connected wallets

Transaction Filters

Filter on-chain transactions:
Transactions:
├── chain is "ethereum"
├── AND contract_name is "Swap Router"
├── AND method_name is "swapExactTokensForTokens"
└── AND value greater_than 0

Common Transaction Filters

FilterUse Case
chain is "ethereum"Ethereum transactions
status is "confirmed"Successful transactions
gas_price less_than 50Low gas transactions
method_name contains "swap"Swap transactions

Cohort Filters

Filter by cohort membership:
Users:
├── IN cohort "Power Users"
└── AND NOT IN cohort "Churned Users"
Cohort filters are particularly useful for:
  • Comparing behavior across segments
  • Excluding specific user groups
  • Analyzing high-value users

Time Filters

Every report supports time range selection:
Time Range: Last 30 days
Granularity: Daily

OR

Custom Range: Jan 1, 2024 - Jan 31, 2024
Granularity: Weekly
See Time Controls for detailed time range options.

Saved Filters

Save frequently used filters for reuse:
  1. Build your filter combination
  2. Click Save Filter
  3. Name it descriptively: “US Pro Web3 Users”
  4. Apply to any report with one click

Best Practices

Be Specific

✅ Good: event_name is "swap_completed" AND chain is "ethereum"
❌ Vague: event_name contains "swap"

Use Appropriate Operators

✅ For exact match: is / equal
✅ For ranges: between / greater_than
✅ For text search: contains

❌ Using contains for exact values
❌ Using is for partial matches

Test Filter Results

Before building complex reports, verify your filters:
  1. Apply filter to simple metric (total events)
  2. Check count makes sense
  3. Spot-check sample records if possible

Document Complex Filters

For complex nested logic, add comments:
# High-value users: Pro plan OR whale behavior
Users where:
├── plan is "pro"                    # Paying customers
└── OR (
    ├── total_volume greater_than 100000  # High volume
    └── AND transaction_count greater_than 50  # Active
)

Next Steps

Breakdowns

Segment data by properties

Time Controls

Configure time ranges