> For the complete documentation index, see [llms.txt](https://docs.autonmis.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.autonmis.com/create-and-manage-your-first-dashboard/create-dashboards-from-sql-editor-or-sql-notebook/using-sql-notebook.md).

# Using SQL Notebook

Follow these steps to create a dashboard using a SQL Notebook:

1. Go to the **'SQL Notebook'** tab under the **'Notebook'** dropdown in the navigation bar.&#x20;
2. Create a SQL Notebook, write and run a SQL query. The results will appear in the **'Data'** tab.
3. Switch to the **'Metrics'** tab to enter **Distributed metric mode**. Here, you can create charts by dragging dimensions and measures into the X and Y axes. You can also select the chart type (Line, Area, Bar, Pie), and add a **chart name** and **description**.

<figure><img src="https://1640066561-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3UjpVP9YQLo2slTy7qQ1%2Fuploads%2FlFhMnQGGCoTOsGxO8Cjh%2Fimage.png?alt=media&amp;token=5be1e37b-2b3d-45dd-b93e-b73424043c69" alt=""><figcaption></figcaption></figure>

4. For Aggregated metrics, choose a metric from the dropdown, select a function (SUM, AVG, COUNT, MAX), and provide a chart name.

<figure><img src="https://1640066561-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3UjpVP9YQLo2slTy7qQ1%2Fuploads%2Fdqj4QTE2k6F2vFV099cg%2Fimage.png?alt=media&amp;token=3cb3523d-e8fd-43d8-8b00-a60346543a8c" alt=""><figcaption></figcaption></figure>

5. Once your chart is ready, you can save it by clicking **'Save as DM'** (for Distributed mode) or **'Save as AM'** (for Aggregated mode).
6. To create a dashboard, click the **'Dashboard'** tab at the top of the notebook. From the list of available metrics, select the ones you want and click **'Go to Dashboard'**. Provide the **dashboard name** and **description**, then click **'Add'** to create it.

<figure><img src="https://1640066561-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3UjpVP9YQLo2slTy7qQ1%2Fuploads%2FhjYpm1aYVSepYYsBRfZZ%2Fimage.png?alt=media&amp;token=a0282d44-1cef-4d91-b3b5-6f22393ade7d" alt=""><figcaption></figcaption></figure>
