Skip to content

Commit a2373e2

Browse files
author
superdb-mcp-sync
committed
Sync docs from superdb-mcp
1 parent 9d232ca commit a2373e2

12 files changed

Lines changed: 35 additions & 34 deletions

_build/expert-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "Expert Guide"
33
description: "Expert guide for SuperDB queries and data transformations. Covers syntax, patterns, and best practices."
44
layout: default
55
nav_order: 2
6-
superdb_version: "0.1.0"
6+
superdb_version: "0.2.0"
77
last_updated: "2026-01-31"
88
---
99

_build/tutorials/bash_to_sup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Getting raw text safely from Bash into SuperDB without manual esca
44
layout: default
55
nav_order: 1
66
parent: Tutorials
7-
superdb_version: "0.1.0"
7+
superdb_version: "0.2.0"
88
last_updated: "2026-02-17"
99
---
1010

_build/tutorials/chess-tiebreaks.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "End-to-end tutorial parsing PGN chess data to find tie-break games
44
layout: default
55
nav_order: 2
66
parent: Tutorials
7-
superdb_version: "0.1.0"
7+
superdb_version: "0.2.0"
88
last_updated: "2026-02-15"
99
---
1010

@@ -34,10 +34,9 @@ super -i line -s -c "
3434
--
3535
-- pair up each player in each game
3636
--
37-
-- future super versions will support window functions, but we can make do with this
38-
--
39-
| put row_num:=count(this)
40-
| put game_id:=((row_num - 1) / 2)::int64
37+
| count
38+
| put game_id:=((count - 1) / 2)::int64
39+
| values {...that, game_id}
4140
| aggregate
4241
last_name_white:=max(last_name_white),
4342
last_name_black:=max(last_name_black)
@@ -66,12 +65,12 @@ super -i line -s -c "
6665
```
6766

6867
```mdtest-output
69-
{player:"Abdusattorov",opponent:"Wei",count:3::uint64}
70-
{player:"Giri",opponent:"Gukesh",count:4::uint64}
71-
{player:"Gukesh",opponent:"Giri",count:4::uint64}
72-
{player:"Gukesh",opponent:"Wei",count:3::uint64}
73-
{player:"Wei",opponent:"Abdusattorov",count:3::uint64}
74-
{player:"Wei",opponent:"Gukesh",count:3::uint64}
68+
{player:"Abdusattorov",opponent:"Wei",count:3}
69+
{player:"Giri",opponent:"Gukesh",count:4}
70+
{player:"Gukesh",opponent:"Giri",count:4}
71+
{player:"Gukesh",opponent:"Wei",count:3}
72+
{player:"Wei",opponent:"Abdusattorov",count:3}
73+
{player:"Wei",opponent:"Gukesh",count:3}
7574
```
7675

7776
## Walkthrough
@@ -96,9 +95,11 @@ which we filter with `where not is_error(this)`.
9695
PGN files list White and Black players on consecutive lines for each game. We
9796
need to combine them into single records.
9897

99-
The trick is using expression-context `count(this)` which produces a running
100-
count (1, 2, 3, ...). Integer division `(row_num - 1) / 2` maps pairs of rows to
101-
the same game_id: rows 1,2 get game_id 0; rows 3,4 get game_id 1, etc.
98+
The `count` operator adds a sequential `count` field to each record (1, 2, 3, ...).
99+
Integer division `(count - 1) / 2` maps pairs of rows to the same game_id:
100+
rows 1,2 get game_id 0; rows 3,4 get game_id 1, etc. The `count` operator wraps
101+
the input in a `that` field, so `{...that, game_id}` spreads the original fields
102+
back out alongside the game_id.
102103

103104
Then `aggregate ... by game_id` with `max()` picks up the non-null value from
104105
each field within each pair.
@@ -213,8 +214,8 @@ super -s -c "
213214
```
214215

215216
```mdtest-output
216-
{player:"Gukesh",opponent:"Wei",count:2::uint64}
217-
{player:"Wei",opponent:"Gukesh",count:2::uint64}
217+
{player:"Gukesh",opponent:"Wei",count:2}
218+
{player:"Wei",opponent:"Gukesh",count:2}
218219
```
219220

220221
## as of versions
@@ -223,5 +224,5 @@ super -s -c "
223224
super --version
224225
```
225226
```mdtest-output
226-
Version: v0.1.0
227+
Version: v0.2.0
227228
```

_build/tutorials/fork_for_window.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Using fork as a workaround for window functions to do per-group se
44
layout: default
55
nav_order: 3
66
parent: Tutorials
7-
superdb_version: "0.1.0"
7+
superdb_version: "0.2.0"
88
last_updated: "2026-02-20"
99
---
1010

_build/tutorials/grok.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Tutorial on using the grok function for text parsing in SuperDB."
44
layout: default
55
nav_order: 4
66
parent: Tutorials
7-
superdb_version: "0.1.0"
7+
superdb_version: "0.2.0"
88
last_updated: "2026-02-15"
99
---
1010

@@ -122,5 +122,5 @@ error({message:"grok: value does not match pattern",on:"foo"})
122122
super --version
123123
```
124124
```mdtest-output
125-
Version: v0.1.0
125+
Version: v0.2.0
126126
```

_build/tutorials/joins.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Examples of outer joins, anti joins, and full outer joins in Super
44
layout: default
55
nav_order: 5
66
parent: Tutorials
7-
superdb_version: "0.1.0"
7+
superdb_version: "0.2.0"
88
last_updated: "2026-02-15"
99
---
1010

@@ -74,5 +74,5 @@ super -s -c "select * from za.sup as za
7474
super --version
7575
```
7676
```mdtest-output
77-
Version: v0.1.0
77+
Version: v0.2.0
7878
```

_build/tutorials/moar_subqueries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Additional subquery patterns including fork and full sub-selects."
44
layout: default
55
nav_order: 6
66
parent: Tutorials
7-
superdb_version: "0.1.0"
7+
superdb_version: "0.2.0"
88
last_updated: "2026-02-15"
99
---
1010

_build/tutorials/subqueries.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Examples of correlated subqueries and derived table patterns in Su
44
layout: default
55
nav_order: 7
66
parent: Tutorials
7-
superdb_version: "0.1.0"
7+
superdb_version: "0.2.0"
88
last_updated: "2026-02-15"
99
---
1010

@@ -87,7 +87,7 @@ super -s -c '
8787
| values {date,foo})
8888
on {left.date,left.foo}={right.date,right.foo}
8989
| values left
90-
| sort id' data.json
90+
| sort id'
9191
```
9292
```mdtest-output
9393
{id:1,date:"2025-02-27",foo:3}
@@ -228,5 +228,5 @@ super -s -c '
228228
super --version
229229
```
230230
```mdtest-output
231-
Version: v0.1.0
231+
Version: v0.2.0
232232
```

_build/tutorials/sup_to_bash.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Optimizing SuperDB output into Bash variables efficiently."
44
layout: default
55
nav_order: 8
66
parent: Tutorials
7-
superdb_version: "0.1.0"
7+
superdb_version: "0.2.0"
88
last_updated: "2026-02-15"
99
---
1010

_build/tutorials/super_db_update.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Workarounds for updating data in a SuperDB lake."
44
layout: default
55
nav_order: 9
66
parent: Tutorials
7-
superdb_version: "0.1.0"
7+
superdb_version: "0.2.0"
88
last_updated: "2026-02-15"
99
---
1010

0 commit comments

Comments
 (0)