> For the complete documentation index, see [llms.txt](https://docs.e6data.com/query-engine/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.e6data.com/query-engine/guides/querying/query-editor.md).

# Query editor

Write, format, and run SQL in the e6data Query Editor - tabs, the query action bar, the SQL editor, and the Schema Explorer.

The Query Editor is where you write and run SQL against your connected clusters and catalogs from the browser. Open it from **Query Editor** in the left navigation. This page covers the editor and Schema Explorer; for running queries and working with output, see [Run queries and view results](/query-engine/guides/querying/run-queries-and-view-results.md).

## Tabs

Organize work across multiple tabs:

| Action    | How                                              |
| --------- | ------------------------------------------------ |
| Add a tab | Click **+** after the last tab                   |
| Rename    | Double-click the tab name                        |
| Reorder   | Drag the tab; order is saved for future sessions |
| Delete    | Hover the tab and click **X**                    |

The tab's kebab menu (⋮) also offers **Keyboard Shortcuts** (or press `F1`), **Format Query**, and **Duplicate** (copies the queries; results don't carry over).

## Query action bar

Above the editor, set the **Catalog**, **Database**, and **Cluster** to run against, choose a default **row limit**, and **Run** or **Save** the query. See [Run queries and view results](/query-engine/guides/querying/run-queries-and-view-results.md) for running behavior and limits.

## SQL editor

The editor helps you write SQL faster:

* **Auto-completion** - suggests commands and functions as you type; press **Tab** to accept.
* **Find & Replace** - `Cmd/Ctrl + F`, with regex (`.*`), case-sensitive (`Aa`), whole-word (`\b`), and search-in-selection options.
* **Error highlighting** - the line or block containing an error is highlighted.

### Keyboard shortcuts

| Action                  | Shortcut                 |
| ----------------------- | ------------------------ |
| Run query               | `Cmd/Ctrl + Enter`       |
| Abort query             | `Cmd/Ctrl + Esc`         |
| Find and replace        | `Cmd/Ctrl + F`           |
| Format query            | `Cmd/Ctrl + Shift + O`   |
| Show / hide results     | `Option/Alt + Shift + T` |
| Show keyboard shortcuts | `F1`                     |

## Schema Explorer

The left-side pane shows the available and active catalogs as an expandable tree of catalogs, databases, and tables. From it you can:

* Expand a catalog to see its databases and tables.
* Click a table to list its columns with data types.
* Copy a table name, or use a column's kebab (⋮) to insert column names or preview data.
* **Refresh** after a catalog is updated, and **search** for a catalog or table.

{% hint style="info" %}
You can search for a database or table only after expanding its catalog and database.
{% endhint %}

## See also

* [Run queries and view results](/query-engine/guides/querying/run-queries-and-view-results.md) - running, results, exports, and execution details.
* [Query history and saved queries](/query-engine/guides/querying/query-history-and-saved-queries.md)
* [Query performance basics](/query-engine/guides/querying/query-performance-basics.md)


---

# 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.e6data.com/query-engine/guides/querying/query-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.
