# Queries in Explore

* [Query history](#queriesinexplore-queryhistory)
  * [View query history](#queriesinexplore-viewqueryhistory)
  * [Manage favorite queries](#queriesinexplore-managefavoritequeries)
  * [Sort query history](#queriesinexplore-sortqueryhistory)
  * [Filter query history](#queriesinexplore-filterqueryhistory)
  * [Search in query history](#queriesinexplore-searchinqueryhistory)
  * [Query history settings](#queriesinexplore-queryhistorysettings)

To help with debugging queries, Explore allows you to investigate query requests and responses, as well as query statistics, via the Query inspector.

***

### Query history <a href="#queriesinexplore-queryhistory" id="queriesinexplore-queryhistory"></a>

Query history is a list of queries that you used in Explore. The history is stored in the Algology database and it is not shared with other users. To open and interact with your history, click the **Query history** button in Explore.

#### View query history <a href="#queriesinexplore-viewqueryhistory" id="queriesinexplore-viewqueryhistory"></a>

Query history lets you view the history of your querying. For each individual query, you can:

* Run a query.
* Create and/or edit a comment.
* Copy a query to the clipboard.
* Copy a shortened link with the query to the clipboard.
* Star a query.

#### Manage favorite queries <a href="#queriesinexplore-managefavoritequeries" id="queriesinexplore-managefavoritequeries"></a>

All queries that have been starred in the Query history tab are displayed in the Starred tab. This allows you to access your favorite queries faster and to reuse these queries without typing them from scratch.

#### Sort query history <a href="#queriesinexplore-sortqueryhistory" id="queriesinexplore-sortqueryhistory"></a>

By default, query history shows you the most recent queries. You can sort your history by date or by data source name in ascending or descending order.

1. Click the **Sort queries by** field.
2. Select one of the following options:
   * Newest first
   * Oldest first

#### Filter query history <a href="#queriesinexplore-filterqueryhistory" id="queriesinexplore-filterqueryhistory"></a>

Filter query history in Query history and Starred tab by data source name:

1. Click the **Filter queries for specific data source(s)** field.
2. Select the data source for which you would like to filter your history. You can select multiple data sources.

In **Query history** tab it is also possible to filter queries by date using the slider:

* Use vertical slider to filter queries by date.
* By dragging bottom handle, adjust start date.
* By dragging top handle, adjust end date.

#### Search in query history <a href="#queriesinexplore-searchinqueryhistory" id="queriesinexplore-searchinqueryhistory"></a>

You can search in your history across queries and your comments. Search is possible for queries in the Query history tab and Starred tab.

1. Click the **Search queries** field.
2. Type the term you are searching for into search field.

#### Query history settings <a href="#queriesinexplore-queryhistorysettings" id="queriesinexplore-queryhistorysettings"></a>

You can customize the query history in the Settings tab. Options are described in the table below.

| Setting                       | Default value     |
| ----------------------------- | ----------------- |
| Change the default active tab | Query history tab |

Note: Query history settings are global, and applied to both panels in split mode.

***
