# 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
{
  "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.

## How to Fix It

### 1. Use the Correct Table Name

<CodeGroup>

```sql Wrong - System table
SELECT * FROM system.tables
```

```sql Correct - Analytics table
SELECT * FROM key_verifications_v1
WHERE time >= now() - INTERVAL 7 DAY
```

</CodeGroup>

### 2. Fix Typos in Table Names

<CodeGroup>

```sql Wrong - Typo
SELECT * FROM key_verification
WHERE time >= now() - INTERVAL 1 DAY
```

```sql Correct
SELECT * FROM key_verifications_v1
WHERE time >= now() - INTERVAL 1 DAY
```

</CodeGroup>

## Available Tables

| Endpoint | Table Name | Description |
| --- | --- | --- |
| `analytics.getVerifications` | `key_verifications_v1` | Raw verification events |
| `analytics.getVerifications` | `key_verifications_per_minute_v1` | Minute-level aggregates |
| `analytics.getVerifications` | `key_verifications_per_hour_v1` | Hour-level aggregates |
| `analytics.getVerifications` | `key_verifications_per_day_v1` | Day-level aggregates |
| `analytics.getVerifications` | `key_verifications_per_month_v1` | Month-level aggregates |
| `analytics.getRatelimits` | `ratelimits_v1` | Raw rate limit events |
| `analytics.getRatelimits` | `ratelimits_per_minute_v1` | Minute-level aggregates |
| `analytics.getRatelimits` | `ratelimits_per_hour_v1` | Hour-level aggregates |
| `analytics.getRatelimits` | `ratelimits_per_day_v1` | Day-level aggregates |
| `analytics.getRatelimits` | `ratelimits_per_month_v1` | Month-level aggregates |
| `analytics.getRuntimeLogs` | `runtime_logs_v1` | Runtime logs of your deployments |
| `analytics.getGatewayRequests` | `gateway_requests_v1` | Raw gateway requests |
