You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**UNNEST(array)** - Expand array elements into separate rows (used in CTEs)
64
+
61
65
### Mathematical Functions
62
66
-**ABS(number)** - Absolute value
63
67
-**CEIL(number)** - Ceiling (round up)
@@ -336,6 +340,43 @@ Output:
336
340
]
337
341
```
338
342
343
+
##### WITH Clause (Common Table Expressions)
344
+
345
+
```bash
346
+
zero-sql "WITH order_items AS (SELECT o._id as order_id, UNNEST(o.items) as item FROM orders o LIMIT 1000) SELECT oi.item.product_id, COUNT(*) as times_ordered FROM order_items oi GROUP BY oi.item.product_id"
0 commit comments