diff --git a/docs/StardustDocs/topics/guides/Guide-for-backend-SQL-developers.md b/docs/StardustDocs/topics/guides/Guide-for-backend-SQL-developers.md index c2beb012e5..2e387f1398 100644 --- a/docs/StardustDocs/topics/guides/Guide-for-backend-SQL-developers.md +++ b/docs/StardustDocs/topics/guides/Guide-for-backend-SQL-developers.md @@ -182,7 +182,7 @@ Think of Kotlin DataFrame as a **data analysis/ETL tool**, not an ORM. | `SUM(amount)` | `.aggregate { sum { amount } }` | | `JOIN` | `.join(otherDf) { id match right.id }` | | `LIMIT 5` | `.take(5)` | -| **Pivot:**
`SELECT * FROM crosstab('SELECT region, year, SUM(amount) FROM sales GROUP BY region, year') AS ct(region text, y2023 int, y2024 int);` | `.pivot(region, year) { sum { amount } }` | +| **Pivot:**
`SELECT * FROM crosstab('SELECT region, year, SUM(amount) FROM sales GROUP BY region, year') AS ct(region text, y2023 int, y2024 int);` | `.groupBy { region }.pivot { year }. sum { amount }` | | **Explode array column:**
`SELECT id, unnest(tags) AS tag FROM products;` | `.explode { tags }` | | **Update column:**
`UPDATE sales SET amount = amount * 1.2;` | `.update { amount }.with { it * 1.2 }` |