---
title: Managing Queries
description: "Efficiently manage, customize, and share SQL queries with options to edit, organize, generate reports, and more."
---
import { Aside, Steps } from '@astrojs/starlight/components';

# Managing Queries

![managing queries](/images/Studio/Queries/Managing-Queries/managing-queries.png)

The **Manage Queries** feature provides you with comprehensive control over your SQL queries, allowing you to organize, customize, and share them efficiently. Below is a brief overview of the various options available for your Queries.

## Showing as Reports

<Steps>
1. Navigate to **Studio <i class="fa-duotone fa-regular fa-arrow-right"></i> Queries**.
2. Find the specific Query that you want to show as a report.
3. Click on the **Show as Report** <i class="fa-duotone fa-regular fa-file-chart-column"></i> on the required Query to generate a report based on that Query.
4. Go to **Studio** <i class="fa-duotone fa-regular fa-arrow-right"></i> **Report** to view and access the generated report.
5. To remove an SQL query report, click again on the **Show as Report** <i class="fa-duotone fa-regular fa-file-chart-column"></i> option.
6. You can download <i class="fa-duotone fa-regular fa-download"></i> or share <i class="fa-duotone fa-regular fa-share-nodes"></i> your report from **My Reports**.
</Steps>

## Editing a Query

Edit the Query to ensure that the reports reflect the desired modifications and meet your evolving requirements.

To modify a Query in Infoveave, follow these steps.

<Steps>
1. Navigate to **Studio <i class="fa-duotone fa-regular fa-arrow-right"></i> Queries**.
2. Locate the specific Query that you want to edit.
3. Click on the **Query Builder** icon <i class="fa-duotone fa-regular fa-pen-to-square"></i> associated with the Query.
4. After making the necessary modifications, click on the **Save** button to save your edits.
</Steps>

## Version history

The version history feature for Queries allows you to track and review changes made to a particular Query over time. By clicking the **Version history** icon <i class="fa-duotone fa-regular fa-code-compare"></i>, you can view the list of changes that have been made to the Query.

## Sharing a Query

Sharing options in Infoveave Query, such as user and role-based sharing, ensure efficient distribution and utilization of analysis among the intended audience.

You can share your Infoveave Query with other users or roles in Infoveave. Follow these steps to share your Infoveave Query.

<Steps>
1. Navigate to **Studio <i class="fa-duotone fa-regular fa-arrow-right"></i> Queries**.
2. Click on the <i class="fa-duotone fa-regular fa-share-nodes"></i> **Share** icon to share the Infoveave Query with the team or role.
3. Choose a sharing method. Select between the available options – Share with User or Share with Role.
4. If you choose Share with User, select the user or users you want to share the Infoveave Query with.
5. To share the Infoveave Query with all users, select the **Share with Everyone** option.
6. If you choose Share with Role, pick the roles you want to share the Infoveave Query with from the share dialogue box.
7. To remove a specific user or role from the shared list, uncheck the corresponding checkbox.
8. Click **Save** to share your Infoveave Query with the selected users or roles.
</Steps>

<Aside type="tip">
* Share icon will be <span style='color:blue'>**Blue**</span> in color when shared with all.
* Share icon will be <span style='color:Green'>**Green**</span> in color when shared with a few.
</Aside>

## Moving to a Folder

Organize your Queries by easily moving them to designated folders.

To organize your Queries under folders, follow these steps.

<Steps>
1. Navigate to **Studio <i class="fa-duotone fa-regular fa-arrow-right"></i> Queries**.
2. Select the Queries you want to move by clicking on the **Move to Folder** icon.
3. Choose the desired folder from the dropdown menu.
4. Click the **Save** button to finalize the move.
</Steps>

<Aside type="tip">
* You can drag and drop a Query to any folder to move it to that specific folder.
* You can also remove a Query from a folder by clicking on the move to folder icon and selecting the Root folder.
</Aside>

## Deleting a Query 
![delete](/images/Studio/Queries/Managing-Queries/delete-query.png)

To delete a Query in Infoveave, follow these simple steps.

<Steps>
1. Navigate to **Studio <i class="fa-duotone fa-regular fa-arrow-right"></i> Queries**.
2. Find the Query you want to delete.
3. Click on the **Delete** icon <i class="fa-duotone fa-regular fa-trash"></i>.
4. Type the specified text from the warning message in the provided text field.
5. Alternatively, you can copy the text from the icon and paste it into the text field.
6. Once you have entered the correct text, click on **Delete**.
</Steps>

<Aside type="caution">
* You cannot delete a Query in Production.
* Please be cautious when deleting, as it cannot be recovered once deleted.
</Aside>