Skip to content

Commit 3c20bb8

Browse files
committed
Update Guide-for-backend-SQL-developers.md
1 parent 49233b5 commit 3c20bb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/StardustDocs/topics/guides/Guide-for-backend-SQL-developers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ Think of Kotlin DataFrame as a **data analysis/ETL tool**, not an ORM.
182182
| `SUM(amount)` | `.aggregate { sum { amount } }` |
183183
| `JOIN` | `.join(otherDf) { id match right.id }` |
184184
| `LIMIT 5` | `.take(5)` |
185-
| **Pivot:** <br>`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 } }` |
185+
| **Pivot:** <br>`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 }` |
186186
| **Explode array column:** <br>`SELECT id, unnest(tags) AS tag FROM products;` | `.explode { tags }` |
187187
| **Update column:** <br>`UPDATE sales SET amount = amount * 1.2;` | `.update { amount }.with { it * 1.2 }` |
188188

0 commit comments

Comments
 (0)