> For the complete documentation index, see [llms.txt](https://docs.cascade.io/cascade/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cascade.io/cascade/tools/code/sql.md).

# SQL

SQL allows for a custom SQL expression to be executed against table(s) inside a Workflow. The supported syntax is PostgreSQL and is executed using [DuckDB](https://duckdb.org/docs/sql/introduction).

*Example SQL expression*

```
SELECT CustomerId, SUM(Sales) 
FROM "order-details" 
WHERE State = "CO" 
GROUP BY 1 
ORDER BY 2 DESC 
LIMIT 10
```
