> ## Documentation Index
> Fetch the complete documentation index at: https://docs.summation.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Calculation table

> A Summation table defined by a SQL query over your other tables.

A **calculation table** is a [Summation table](/features/tables) defined by a **SQL `SELECT`** over your existing tables. Use it for derived datasets — aggregations, rollups, joins, and summaries computed from other tables.

**What you can do**

* Define the table with a SQL query; its columns come from the query.
* **Materialize** it the first time, then **refresh** (synchronize) it to recompute from the latest source data.
* Trace its lineage back to the tables it reads from.

## Create a calculation table

<Tabs sync={false}>
  <Tab title="In the app">
    On the [Tables](/features/tables) page, click **Create → Calculation Table**, then write the `SELECT` in the SQL editor and **Run** it. **Saving does not materialize the result** — it applies the SQL as a column change and leaves the table unmaterialized. Materialize it separately (see **Via the API**) before it can be queried.

    <Frame caption="A calculation table's SQL">
      <img src="https://mintcdn.com/summation-676748f5/ewrpxeNnW54PEh54/images/features/tables/calculation-table.png?fit=max&auto=format&n=ewrpxeNnW54PEh54&q=85&s=500d572e9a82cc3a73cb54ffd40473ed" alt="A calculation table 'DemoCalcTable' showing a data grid (ID, Name, Sex, Age columns) above a SQL editor with 'Run' and a 'Saved' indicator, running SELECT * FROM olympics_event LIMIT 50." width="1066" height="1316" data-path="images/features/tables/calculation-table.png" />
    </Frame>
  </Tab>

  <Tab title="Via the API">
    <Card title="POST /v1/grid/tables" icon="code" href="/api-reference/grid/create-calculation-table" horizontal>
      Create a calculation table from a SELECT query.
    </Card>

    <Card title="POST /v1/grid/tables/{tableId}/materialize" icon="code" href="/api-reference/grid/materialize-calculation-table" horizontal>
      Materialize the table so it can be queried.
    </Card>

    <Card title="POST /v1/grid/tables/{tableId}/synchronizations" icon="code" href="/api-reference/grid/synchronize-materialized-table" horizontal>
      Refresh it from the latest source data.
    </Card>
  </Tab>
</Tabs>
