---
title: "Get column-level statistics for a table"
method: GET
path: "/workspaces/{workspace_id}/tables/{table_name}/stats"
tags: ["tables"]
---

# Get column-level statistics for a table

`GET /workspaces/{workspace_id}/tables/{table_name}/stats`

Returns column-level statistics from PostgreSQL's pg_stats view, with optional computed aggregates for numeric columns.

## Path parameters

- `workspace_id` string, required
- `table_name` string, required

## Query parameters

- `columns` string
- `include_aggregates` boolean

## Response `200`

Table statistics with column details

- GithubComActiveloopaiDeeplakeApiInternalTablesTableStatistics
  - `columns` object
  - `stats_available` boolean
  - `table_name` string

## Other responses

- `400` — Invalid workspace ID, missing table name, or invalid column filter
- `401` — Unauthorized - missing or invalid authentication
- `403` — Access denied - user does not have access to this workspace
- `404` — Table not found or workspace schema not found
- `500` — Internal server error

---

[API](https://skmtc.net/deeplake/apis/deeplake-api.md) · [All operations](https://skmtc.net/deeplake/apis/deeplake-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/deeplake/deeplake-api/revisions/e16ed11d991c/schema)
