> For the complete documentation index, see [llms.txt](https://docs.buildings.ability.abb/collection/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.buildings.ability.abb/collection/german/plattform/alarms-rules-and-escalations/rule-chains/nodes/sql-query.md).

# SQL-Abfrage

Daten mit SQL innerhalb einer Regelkette abfragen.

## ![](https://2215908449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOqGnkz52o2zVUsEGEZGk%2Fuploads%2F3ZU3n96poVd0jXiwCHlH%2FSQl.png?alt=media\&token=a0b02caf-f750-4b57-8557-78f222034917)

Verwenden **SQL-Abfrage** um eine SQL-Abfrage innerhalb einer Regelkette auszuführen.

Dieser Knoten gibt Abfrageergebnisse an nachgelagerte Knoten zurück.

<div align="left"><figure><img src="https://2215908449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOqGnkz52o2zVUsEGEZGk%2Fuploads%2FEqFFg1XNF54bdCVMc6i2%2FSQl%20(2).png?alt=media&amp;token=9e4cf921-6caa-42b1-b10c-ada03b44dfeb" alt="" width="337"><figcaption></figcaption></figure></div>

### Was er tut

Der Knoten führt die konfigurierte SQL-Anweisung aus, wenn er ausgelöst wird.

Verwenden Sie ihn, um Daten für die spätere Verarbeitung abzurufen.

### Eingaben und Ausgaben

**Eingabe**

* **Auslöser** — Startet die Abfrage.

**Ausgabe**

* **Daten** — Gibt das Abfrageergebnis zurück.

### Konfigurierbare Einstellungen

<div align="left"><figure><img src="https://2215908449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOqGnkz52o2zVUsEGEZGk%2Fuploads%2FWpyQBDdunOpvXlxhFENP%2FSQl%20(1).png?alt=media&amp;token=f24c8425-dacc-4b88-8bb1-fe16b9427cd9" alt="" width="375"><figcaption></figcaption></figure></div>

* **SQL-Abfrage** — Geben Sie die auszuführende SQL-Anweisung ein.

### Typische Verwendung

Verwenden **SQL-Abfrage** vor **LLM-Aufruf** oder anderen Verarbeitungsknoten.

### Verwandte Dokumentation

* [Skript-Engine](/collection/german/plattform/platform-core/script-engine.md)
* [Schreiben von PL/PgSQL-Skripten](/collection/german/plattform/platform-core/script-engine/writing-pl-pgsql-scripts.md)
* [Knoten](/collection/german/plattform/alarms-rules-and-escalations/rule-chains/nodes.md)

Den vollständigen Editor-Workflow finden Sie unter [Regelkette konfigurieren](/collection/german/plattform/alarms-rules-and-escalations/rule-chains/configure-rule-chain.md).


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.buildings.ability.abb/collection/german/plattform/alarms-rules-and-escalations/rule-chains/nodes/sql-query.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
