> For the complete documentation index, see [llms.txt](https://docs.skydeck.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.skydeck.ai/pt/genstudio-workspace/tools/sql-assistant/how-to-use.md).

# Como Usar

Para começar a usar o SQL Assistant, você precisará fornecer um segmento de Linguagem de Definição de Dados (DDL) e uma descrição da tarefa.

* **Segmento DDL** – um subconjunto de comandos SQL, objetos, atributos e restrições que se concentra em definir ou modificar a estrutura dos objetos do banco de dados.
* **Descrição da tarefa** – instruções relacionadas ao DDL que dizem ao SQL Assistant com o que você precisa de ajuda.

<figure><img src="/files/reeeGW13UnpkHEZRy2J3" alt="sql assistant 2"><figcaption></figcaption></figure>

O prompt padrão que carrega sempre que você cria um novo chat com o SQL Assistant, modela como criar seus próprios prompts:

* A instrução DDL cria uma tabela chamada ‘transactions’ com 5 colunas (transaction\_id, customer\_id, transaction\_date, amount e description).
* A descrição da tarefa pede ao SQL Assistant para fornecer uma consulta que imprimirá todas as transações superiores a 1000 dólares.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.skydeck.ai/pt/genstudio-workspace/tools/sql-assistant/how-to-use.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.
