The demo floor / the lake
Ask the lake
Every order, trade and cancel this floor has kept is also a row of columns in a lake (DuckLake: Parquet files and a small catalog). Each panel below is a question in SQL, asked again with every change and every choice.
So there's a month to ask about, this floor's thirty days before 27 November 2026 were written in one go: its bots trading as they do live, every change decided by the floor's own rules. Since then it's live.
5 questions · 428 ms · 162.7 MB read
The floor and the lakeThey agree.as of change 1,211,113
| events | orders | trades | markets | members | |
|---|---|---|---|---|---|
| The floor's own countFloor | 1,211,075 | 633,501 | 232,717 | 66 | 9 |
| The lake's, in SQLLake | 1,211,075 | 633,501 | 232,717 | 66 | 9 |
- Span
- 15m1h6h24h7dAll489 events asked about
- Market
- Every marketWill the next deploy need a rollback?Will the standup run over ten minutes?Will the flaky test pass three times running?Will the roadmap survive the quarter?Will the office be more than half full on Monday?Will the design review ask for another round?Will the quarterly numbers beat the forecast?Will the on-call handoff happen on time?Will the incident review name one root cause?
- Member
- EveryoneEuler (bot)Bayes (bot)Ada (bot)Gauss (bot)Fisher (bot)JordanDutch (bot)Coase (bot)
Order flowshares bid at each price; the line, what it traded atfewermore shares bid
125507599traded, by priceorders: YES over NOline: trades
one question, four parts · 89 ms · 32.5 MB read · 148 rowsSQL
WITH w AS (SELECT greatest(max(at_ms) - 86400000, min(at_ms)) AS t0, max(at_ms) AS t1 FROM events),
e AS (
SELECT events.*, w.t0, w.t1, least((at_ms - w.t0) * 48 // greatest(w.t1 - w.t0, 1), 47) AS stretch
FROM events, w WHERE at_ms >= w.t0 AND (market = '9bf31dd5e741085d' OR kind = 'OrderCancelled' AND "order" IN (SELECT "order" FROM events WHERE kind = 'OrderPlaced' AND market = '9bf31dd5e741085d')) AND "by" = '11d8c2709501bd85'
)
SELECT 'flow' AS part, NULL AS market, stretch AS a,
(CASE side WHEN 'Yes' THEN "limit" ELSE 100 - "limit" END - 1) // 3 AS b,
sum(shares) AS c, NULL AS d, NULL AS e, NULL AS f, NULL AS g
FROM e WHERE kind = 'OrderPlaced' GROUP BY ALL
UNION ALL
SELECT 'lines', market, stretch, sum(price * shares) / sum(shares), NULL, NULL, NULL, NULL, NULL
FROM e WHERE kind = 'Traded' GROUP BY ALL
UNION ALL
SELECT 'busy', NULL, stretch,
count(*) FILTER (WHERE kind = 'OrderPlaced' AND side = 'Yes'),
count(*) FILTER (WHERE kind = 'OrderPlaced' AND side = 'No'),
count(*) FILTER (WHERE kind = 'Traded'), count(*), min(t0), min(t1)
FROM e GROUP BY ALL
UNION ALL
SELECT 'profile', NULL, (price - 1) // 3, sum(shares), count(*), NULL, NULL, NULL, NULL
FROM e WHERE kind = 'Traded' GROUP BY ALL
ORDER BY part, market, aWho trades with whomshares
| from whose resting order | ||||||||
|---|---|---|---|---|---|---|---|---|
| who took | Coas | Haye | Dutc | Baye | Fish | Ada | Gaus | Eule |
| Coase (bot) | ||||||||
| Hayek (bot) | ||||||||
| Dutch (bot) | ||||||||
| Bayes (bot) | ||||||||
| Fisher (bot) | ||||||||
| Ada (bot) | ||||||||
| Gauss (bot) | ||||||||
| Euler (bot) | ||||||||
a join · 148 ms · 32.5 MB read · 7 rowsSQL
WITH w AS (SELECT greatest(max(at_ms) - 86400000, min(at_ms)) AS t0, max(at_ms) AS t1 FROM events), e AS ( SELECT events.*, w.t0, w.t1, least((at_ms - w.t0) * 48 // greatest(w.t1 - w.t0, 1), 47) AS stretch FROM events, w WHERE at_ms >= w.t0 AND (market = '9bf31dd5e741085d' OR kind = 'OrderCancelled' AND "order" IN (SELECT "order" FROM events WHERE kind = 'OrderPlaced' AND market = '9bf31dd5e741085d')) AND "by" = '11d8c2709501bd85' ) , placed AS (SELECT "order", "by" AS owner FROM events WHERE kind = 'OrderPlaced') SELECT t."by" AS taker, CASE WHEN y.owner = t."by" THEN n.owner ELSE y.owner END AS maker, sum(t.shares) AS shares, count(*) AS trades FROM e t JOIN placed y ON y."order" = t.yes JOIN placed n ON n."order" = t."no" WHERE t.kind = 'Traded' GROUP BY 1, 2 ORDER BY shares DESC LIMIT 200
Membersthe busiest first
| Member | Orders | Shares bid | Took | Cancelled |
|---|---|---|---|---|
| Dutch (bot) | 276 | 691 | 102 | 154 |
| Hayek (bot) | 275 | 786 | 79 | 132 |
| Coase (bot) | 272 | 774 | 85 | 132 |
| Bayes (bot) | 262 | 653 | 86 | 166 |
| Euler (bot) | 256 | 653 | 85 | 156 |
| Fisher (bot) | 225 | 590 | 75 | 140 |
| Gauss (bot) | 211 | 437 | 61 | 148 |
| Ada (bot) | 206 | 452 | 85 | 126 |
by member · 88 ms · 32.5 MB read · 8 rowsSQL
WITH w AS (SELECT greatest(max(at_ms) - 86400000, min(at_ms)) AS t0, max(at_ms) AS t1 FROM events), e AS ( SELECT events.*, w.t0, w.t1, least((at_ms - w.t0) * 48 // greatest(w.t1 - w.t0, 1), 47) AS stretch FROM events, w WHERE at_ms >= w.t0 AND (market = '9bf31dd5e741085d' OR kind = 'OrderCancelled' AND "order" IN (SELECT "order" FROM events WHERE kind = 'OrderPlaced' AND market = '9bf31dd5e741085d')) ) SELECT "by" AS member, count(*) FILTER (WHERE kind = 'OrderPlaced') AS orders, sum(shares) FILTER (WHERE kind = 'OrderPlaced') AS bid, count(*) FILTER (WHERE kind = 'Traded') AS took, count(*) FILTER (WHERE kind = 'OrderCancelled') AS cancelled FROM e GROUP BY 1 HAVING count(*) FILTER (WHERE kind = 'OrderPlaced') > 0 ORDER BY orders DESC, member LIMIT 12
Marketsthe most traded first
| Market | Orders | Trades | Shares | Avg | First | Last |
|---|---|---|---|---|---|---|
| Will the design review ask for another round? | 1,264 | 480 | 786 | 38.7 | 32 | 23 |
| Will the dashboard load in under a second by Friday? | 1,067 | 452 | 750 | 68.7 | 52 | 56 |
| Will the build be green by lunch? | 973 | 417 | 681 | 49.2 | 65 | 54 |
| Will the office be more than half full on Monday? | 913 | 396 | 647 | 46.6 | 50 | 51 |
| Will the pager stay quiet tonight? | 896 | 336 | 563 | 30.9 | 25 | 20 |
| Will the next deploy need a rollback? | 738 | 341 | 539 | 56.1 | 66 | 45 |
| Will the release ship this week? | 733 | 329 | 513 | 52.2 | 67 | 25 |
| Will the standup run over ten minutes? | 636 | 303 | 470 | 47.7 | 50 | 17 |
| Will the customer call run long? | 515 | 219 | 365 | 44.1 | 49 | 86 |
| Will the incident review name one root cause? | 272 | 85 | 144 | 63.2 | 59 | 74 |
| Will the flaky test pass three times running? | 141 | 66 | 103 | 49.7 | 55 | 20 |
| Will the roadmap survive the quarter? | 4 | 2 | 3 | 40.0 | 42 | 39 |
by market · 64 ms · 32.5 MB read · 12 rowsSQL
WITH w AS (SELECT greatest(max(at_ms) - 86400000, min(at_ms)) AS t0, max(at_ms) AS t1 FROM events), e AS ( SELECT events.*, w.t0, w.t1, least((at_ms - w.t0) * 48 // greatest(w.t1 - w.t0, 1), 47) AS stretch FROM events, w WHERE at_ms >= w.t0 AND "by" = '11d8c2709501bd85' ) SELECT market, count(*) FILTER (WHERE kind = 'OrderPlaced') AS orders, count(*) FILTER (WHERE kind = 'Traded') AS trades, sum(shares) FILTER (WHERE kind = 'Traded') AS traded, sum(price * shares) FILTER (WHERE kind = 'Traded') / sum(shares) FILTER (WHERE kind = 'Traded') AS average, arg_min(price, seq) FILTER (WHERE kind = 'Traded') AS first, arg_max(price, seq) FILTER (WHERE kind = 'Traded') AS last FROM e WHERE market IS NOT NULL GROUP BY 1 ORDER BY traded DESC NULLS LAST, market LIMIT 12