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

# Get Table Queries

`GET /tables/queries/{table_id}`

## Request

- Base URL: `https://api.myaltimate.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.myaltimate.com/tables/queries/{table_id}`
- Auth: HTTP bearer

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.dev/myaltimate/apis/myaltimate-api.md) - [All operations](https://skmtc.dev/myaltimate/apis/myaltimate-api/llms.txt) - [OpenAPI document](https://skmtc.dev/myaltimate/apis/myaltimate-api/revisions/727657ce54e9?raw)
