# Notebooks

> Write queries and build charts in one scrolling document, add notes between them, then pin the charts to any dashboard in Orcabase.

Source: https://tini.so/docs/notebooks

A **notebook** is one scrolling document for working through an analysis: SQL cells with their results and charts right underneath, and text cells for headings and notes. When a chart is ready, pin it to any dashboard without leaving the page.

## Build a notebook

1. **Create it**

   Go to **Notebooks → New notebook**. Click the title to name it.

2. **Add a SQL cell**

   Click **SQL cell**. Each cell has its own data source (pick it in the cell’s header), its own SQL and its own result. Run it with **Run**.

3. **Chart the result**

   Click **Set chart** under a result to add a chart, built from that cell’s columns. **Edit chart** changes it later.

4. **Add notes**

   Click **Text cell** for a heading or a few lines of explanation between charts.

5. **Pin charts to dashboards**

   Click **Add to dashboard** on a chart and pick a dashboard. You can pin the same chart to several dashboards, then move and resize it there.

Hover over a cell to show **Move up**, **Move down** and **Delete cell**.

## How cells work

- Each SQL cell is a saved [query](https://tini.so/docs/queries), so it also appears on the **Queries** page, and its chart can go anywhere a query’s chart can.
- Cells run one at a time, each against its own data source. A cell can’t read another cell’s result.
- Notebooks are for one person at a time: two people editing the same notebook at once can overwrite each other.

> **Important: Deleting a cell deletes its query**
>
> Because each SQL cell is a query, deleting the cell (or the whole notebook) deletes those queries everywhere, and their charts disappear from every dashboard they’re pinned to. Keep the cells behind charts you still use.

## Notebooks or dashboards?

Use a notebook to work something out: try queries, compare charts, write down what you found. Use a [dashboard](https://tini.so/docs/dashboards) for the numbers people check again and again. Most dashboards start life as a notebook.

---

Previous: [Charts](https://tini.so/docs/charts.md) · Next: [How metrics work](https://tini.so/docs/semantic-layer.md)

All docs: https://tini.so/llms.txt
