---
title: "Get Table Queries"
method: GET
path: "/tables/queries/{table_id}"
tags: ["TABLES"]
---

# Get Table Queries

`GET /tables/queries/{table_id}`

Get all queries that accessed a specific table.
This endpoint retrieves queries from the access_history_query_table_accessed table
joined with query_usage_data for execution details.

## Path parameters

- `table_id` integer, required

## Query parameters

- `access_types` string[], nullable
- `instance_ids` integer[], nullable
- `user_names` string[], nullable
- `warehouse_names` string[], nullable
- `insights` string[], nullable
- `start_date` string, nullable
- `end_date` string, nullable
- `execution_time_filter` number, nullable
- `execution_time_filter_mode` string, nullable — Filter mode: gt, lt, gte, lte
- `estimated_cost_filter` number, nullable — Query cost filter
- `estimated_cost_filter_mode` string, nullable — Filter mode: gt, lt, gte, lte
- `page` integer — Page number
- `size` integer — Page size (max 100)
- `order_by` string, nullable
- `sort_order` string, nullable

## Response `200`

Successful Response

- TableQueriesResponse — Paginated response for table queries
  - `items` TableQueryResponse[], required
    - `query_id` string, required
    - `access_type` string, required
    - `hash` string, nullable
    - `query_text` string, nullable
    - `insights` string[], nullable
    - `instance_id` integer, nullable
    - `user_name` string, nullable
    - `warehouse_name` string, nullable
    - `start_time` string, date-time, nullable
    - `end_time` string, date-time, nullable
    - `execution_time` integer, nullable
    - `execution_status` string, nullable
    - `query_cost` number, nullable
    - `bytes_scanned` integer, nullable
    - `rows_produced` integer, nullable
  - `total` integer, required
  - `page` integer, required
  - `size` integer, required
  - `pages` integer, required

## Other responses

- `400` — Bad request or table not found
- `403` — Not supported for public user
- `422` — Validation Error

---

[API](https://skmtc.net/myaltimate/apis/fastapi.md) · [All operations](https://skmtc.net/myaltimate/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/myaltimate/fastapi/versions/103580dad816/schema)
