# Add a query

To add a query:&#x20;

1. Choose **Queries** tab&#x20;
2. Click **Add** button to add a query
3. Choose the connection&#x20;
4. Fill in the query name.&#x20;
5. You can choose cache time. Cache time help us display the dashboard faster for viewer, and reduce the load for your database server.
6. Write your SQL in the query box. You can view Schema and Table to help you while you are executing your query
7. After completing these steps, select **Next** to finish the process

That’s done, you already add a query to Dataflake!

<figure><img src="/files/AWP7tTJiw3dbdRAAYqkT" alt=""><figcaption></figcaption></figure>


---

# 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://doc.dataflake.co/query/add-a-query.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.
