> ## Documentation Index
> Fetch the complete documentation index at: https://unkey.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# invalid_analytics_table

> Your analytics query references a table that does not exist or is not accessible in Unkey. Check available tables in the schema reference.

<Danger>`err:user:bad_request:invalid_analytics_table`</Danger>

```json Example theme={"theme":"kanagawa-wave"}
{
  "meta": {
    "requestId": "req_4dgzrNP3Je5mU1tD"
  },
  "error": {
    "detail": "Access to table 'system.tables' is not allowed",
    "status": 400,
    "title": "Bad Request",
    "type": "https://unkey.com/docs/errors/user/bad_request/invalid_analytics_table"
  }
}
```

## What Happened?

Your query tried to access a table that either doesn't exist or isn't allowed for security reasons.

For security, only specific analytics tables are accessible:

* `key_verifications_v1` - Raw key verification events
* `key_verifications_per_minute_v1` - Minute-level aggregates
* `key_verifications_per_hour_v1` - Hour-level aggregates
* `key_verifications_per_day_v1` - Day-level aggregates
* `key_verifications_per_month_v1` - Month-level aggregates

System tables (like `system.*`) and other database tables are blocked.

## How to Fix It

### 1. Use the Correct Table Name

<CodeGroup>
  ```sql Wrong - System table theme={"theme":"kanagawa-wave"}
  SELECT * FROM system.tables
  ```

  ```sql Correct - Analytics table theme={"theme":"kanagawa-wave"}
  SELECT * FROM key_verifications_v1
  WHERE time >= now() - INTERVAL 7 DAY
  ```
</CodeGroup>

### 2. Fix Typos in Table Names

<CodeGroup>
  ```sql Wrong - Typo theme={"theme":"kanagawa-wave"}
  SELECT * FROM key_verification
  WHERE time >= now() - INTERVAL 1 DAY
  ```

  ```sql Correct theme={"theme":"kanagawa-wave"}
  SELECT * FROM key_verifications_v1
  WHERE time >= now() - INTERVAL 1 DAY
  ```
</CodeGroup>

## Available Tables

| Table Name                        | Description             |
| --------------------------------- | ----------------------- |
| `key_verifications_v1`            | Raw verification events |
| `key_verifications_per_minute_v1` | Minute-level aggregates |
| `key_verifications_per_hour_v1`   | Hour-level aggregates   |
| `key_verifications_per_day_v1`    | Day-level aggregates    |
| `key_verifications_per_month_v1`  | Month-level aggregates  |
