# Query History

All queries submitted via the Query Editor will be logged in the History tab on the left sidebar.

![](/files/-LrtdiWpM1EJB3911dNO)

## **Reuse a query from History**

&#x20;To use a query from the history:

* Double click on the query to insert in into the current Query Editor.
* Right click on the query in the History and choose:
  * **`Copy`** to copy the query to the clipboard
  * **`Run`** to execute the query in a new tab
  * **`Open in anew tab`** to open Query Editor in a new tab and insert the query into it.
  * **`Insert to SQL Editor`** to insert the query into the current Query Editor.

## **Delete query**

**To delete a query from History**, right click on the query and choose **`Delete`**

**To clear all query history**, right click on a query and choose **`Clear all history`**

## **Save to Favorite**

**To save a query from History to Favorite**:

* Right click on the query and choose **`Add to favorite`**
* Name the query and assign the bending keyword
* Press **`⌘ + S`** to save, then close the window.

## **Find the query location**

**To see the location of the SQL file that contains query**, right click on the query and choose `Show in Finder`


---

# Agent Instructions: 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:

```
GET https://docs.tableplus.com/query-editor/query-history.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
