---
title: "Analyze Query Static Endpoint"
method: POST
path: "/copilot/quickchat/query-static-analysis"
tags: ["Copilot"]
---

# Analyze Query Static Endpoint

`POST /copilot/quickchat/query-static-analysis`

## 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/copilot/quickchat/query-static-analysis`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Perform static analysis on a SQL query without executing it.

This endpoint analyzes the query structure to identify potential issues
such as SELECT *, functions in JOIN/filter conditions, missing LIMIT,
and Cartesian products.

Args:
    request: Contains the SQL query and optional dialect (default: snowflake)

Returns:
    Analysis results with identified issues and recommendations

## Headers

- `x-tenant` string

## Request body

- StaticQueryAnalysisRequest: Request schema for static query analysis.
  - `sql` string, required
  - `dialect` string, nullable

## Response `200`

Successful Response

- StaticQueryAnalysisResponse: Response schema for static query analysis.
  - `success` boolean, required
  - `query` string, nullable
  - `dialect` string, nullable
  - `issues` StaticQueryIssue[]
    - `type` string, required
    - `severity` string, required
    - `message` string, required
    - `recommendation` string, required
    - `location` string, nullable
    - `disclaimer` string, nullable
  - `issue_count` integer
  - `error` string, nullable

## Other responses

- `400`: Invalid SQL query
- `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)
