---
title: "Get Latest Query For Query Group By Hash"
method: GET
path: "/query/v2/group_latest_query/{query_hash}"
tags: ["QUERIES_V2"]
---

# Get Latest Query For Query Group By Hash

`GET /query/v2/group_latest_query/{query_hash}`

## Path parameters

- `query_hash` string, required

## Headers

- `x-tenant` string, required

## Response `200`

Successful Response

- QueryFetchResponse
  - `query` QueryObject
    - `id` string, required
    - `query_id` string, required
    - `query_text` string, nullable
    - `query_type` string, required
    - `tags` QueryTag[], nullable
      - `tag_rk` string, required
      - `reason` string, required
      - `reports` Report[], nullable
        - `query_span` string, nullable
        - `description` string, nullable
        - `indices` array[], nullable
          - unknown[]
            - unknown
        - `metadata` object, nullable
      - `tag_icon_text` string, nullable
      - `description` string, nullable
    - `timestamp` string, nullable
    - `warehouse_name` string, nullable
    - `warehouse_size` string, nullable
    - `user_name` string, nullable
    - `execution_time` string, nullable
    - `currency` string, nullable
    - `cost` string, nullable
    - `percent_partition_scanned` string, nullable
    - `bytes_spilled` string, nullable
    - `data_store_id` integer, nullable
    - `start_time` string, nullable
    - `custom_tag` QueryCustomTag
      - `reason` string, nullable
      - `user` integer, nullable
    - `percentage_scanned_from_cache` string, nullable
    - `query_load_percent` string, nullable
    - `query_hash_count` integer, nullable
  - `ok` boolean, required
  - `error_code` string, nullable
  - `message` string, nullable

## Other responses

- `400` — Not supported for public user
- `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)
