Skip to main content
Unkey Analytics stores verification events across multiple time-series tables for efficient querying. This reference documents all available tables and their columns.
Use aggregated tables (per_hour, per_day, per_month) for queries spanning long time periods to improve performance.

Raw Events Table

The key_verifications_v1 table contains individual verification events as they occur.

Columns

Outcome Values

The outcome column contains one of these values:

Aggregated Tables

Pre-aggregated tables provide better query performance for long time ranges. Each aggregated table includes outcome counts.

Per Minute Table

key_verifications_per_minute_v1 - Aggregated by minute

Per Hour Table

key_verifications_per_hour_v1 - Aggregated by hour. Same columns as per-minute table.

Per Day Table

key_verifications_per_day_v1 - Aggregated by day. Same columns as per-minute table.

Per Month Table

key_verifications_per_month_v1 - Aggregated by month. Same columns as per-minute table.

Filtering by keyspace and user

You can use your familiar identifiers directly in queries:
  • key_space_id - Your KeySpace ID (e.g., ks_1234). Find this in your Keyspace Settings.
  • external_id - Your user identifiers (e.g., user_abc123) from your application
All standard comparison operators are supported: =, !=, <, >, <=, >=, IN, NOT IN

Filter by keyspace

Filter by User

Multiple Values

Working with Tags

Tags are stored as Array(String) and require array functions to query.

Check if tag exists

Check if any tag exists

Check if all tags exist

Extract and group by tags

Filter tags with pattern

Time Functions

Timestamps are stored differently depending on the table:
  • Raw table (key_verifications_v1): time is Int64 (Unix milliseconds)
  • Aggregated tables: time is DateTime

Current Time

Time Ranges (Raw Table)

For the raw key_verifications_v1 table, compare time with millisecond timestamps:

Time Ranges (Aggregated Tables)

For aggregated tables, use DateTime comparisons directly:

Time Rounding (Raw Table)

Specific Date Ranges

Common ClickHouse Functions

Aggregate Functions

String Functions

Array Functions

Math Functions

Conditional Functions

Performance Tips

  1. Always filter by time - Use time-based WHERE clauses to leverage indexes
  2. Use aggregated tables - Query hourly/daily/month tables for long ranges
  3. Limit result sets - Add LIMIT clauses to prevent large results
  4. Filter before grouping - Use WHERE instead of HAVING when possible
  5. Avoid SELECT * - Only select columns you need

Query Limits

See Query Restrictions for more details on query limits and restrictions.
Last modified on June 2, 2026