> For the complete documentation index, see [llms.txt](https://docs.airops.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.airops.com/docs/de/aktionen/workflow-concepts/workflow-steps/logic-steps/sql-query.md).

# SQL-Abfrage ausführen

Fragen Sie Ihre Datenbank direkt aus einem Workflow ab

Der SQL-Query-Schritt ermöglicht es Ihnen, Abfragen direkt gegen Ihre verbundenen Datenbanken auszuführen. Dies kann nützlich sein, um Daten in Ihre Workflows zu ziehen oder sogar Workflows zu erstellen, die darauf ausgerichtet sind, direkt in Ihre Datenbanken zu schreiben.

## Konfiguration eines „SQL Query“-Schritts

Der SQL-Query-Schritt ist recht unkompliziert. Die einzige Voraussetzung ist, dass Sie eine SQL-Datenbank über einen Benutzer mit Lesezugriff verbunden haben. Weitere Informationen finden Sie auf unserer Dokumentationsseite zu [Datenquellen verbinden](/docs/de/kontext/memory-stores/add-data/import-from-sql-database/data-sources.md) für weitere Informationen.

Sobald Sie erfolgreich eine Datenquelle verbunden haben, können Sie wie unten gezeigt einen SQL-Query-Schritt zu Ihren Workflows hinzufügen:

{% @arcade/embed url="<https://app.arcade.software/share/10JanDKu9KE0Ahb7n7Fp>" flowId="10JanDKu9KE0Ahb7n7Fp" %}

Einer der leistungsstärksten Anwendungsfälle, die wir für unseren SQL-Query-Schritt gesehen haben, ist die Unterstützung eines Agents beim Schreiben und Bearbeiten Ihrer eigenen Abfragen. Er war so beliebt, dass wir unsere „Data Sidekick“-Agentenvorlage darum herum entwickelt haben.

Wenn Sie beginnen, Ihre Anwendungsfälle genauer zu untersuchen, empfehlen wir Ihnen, einen kurzen Blick hinter die Kulissen zu werfen:

<figure><img src="https://1960680173-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX2n5yPRPynbnWuO4SH0M%2Fuploads%2Fgit-blob-92c24093963ddc7153dd0be3c8da77356686d77e%2Futility_sql_query.png?alt=media" alt=""><figcaption><p>Einen SQL-Query-Schritt verwenden, um unseren „Data Sidekick“-Agenten zu unterstützen</p></figcaption></figure>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.airops.com/docs/de/aktionen/workflow-concepts/workflow-steps/logic-steps/sql-query.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
