# `Lotus.AI.Actions.ExecuteSQL`
[🔗](https://github.com/typhoonworks/lotus/blob/v0.16.6/lib/lotus/ai/actions/execute_sql.ex#L1)

Executes a SQL query against a data source.

Used by the investigation agent to run queries and analyze results.
Returns column names, row count, and a preview of the first rows
(capped to avoid overwhelming the LLM context).

---

*Consult [api-reference.md](api-reference.md) for complete listing*
