> 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-editor.md).

# Using SQL Editor

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

1. Go to the **'SQL Editor'** tab.
2. Create a chart, write and run a SQL query to retrieve data. The query results will be displayed under the **'Data'** tab in the 'Visualize' section.
3. Click the **'Metrics'** tab to enter **Distributed metric mode** and drag dimensions and measures into the X-axis and Y-axis fields to create a chart. You can also select the chart type (Line, Area, Bar, Pie), and add a **chart name** and **description**.

<figure><img src="/files/aZ3I6QuPBCXi0MEfRrlX" 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="/files/4FGxs32fcdStqeJ6jtCQ" alt=""><figcaption></figcaption></figure>

5. To publish the chart within a dashboard, click on the **'Publish Chart'** button. This will display a list of existing dashboards. If you want to create a new dashboard, click on the **'Add Dashboard'** button. A popup will prompt you to provide the **dashboard name and description**.

<figure><img src="/files/ZLmlbuAg061LCeYwdv4i" alt=""><figcaption></figcaption></figure>

After entering these details, click **'Add'** to create the new dashboard. Then, select the newly created dashboard from the dropdown and click **'Publish'** to publish the chart within that dashboard.

<figure><img src="/files/1ZPl29ULidp38TLEZi0M" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.autonmis.com/create-and-manage-your-first-dashboard/create-dashboards-from-sql-editor-or-sql-notebook/using-sql-editor.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
