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

# 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`
