SQL Concepts Lab — interactive SQL trainer running entirely on DuckDB-Wasm #2233
oluies
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I built SQL Concepts Lab — an interactive SQL trainer that runs entirely on DuckDB-Wasm, with no server or backend of any kind. Everything (the database, the example queries, and the exercise grading) happens inside the browser tab.
What it is
Ten lessons that build from
SELECT/WHEREup through joins,GROUP BY/HAVING, CTEs, window functions, set operations,EXPLAIN/query plans, and a SQL-dialect comparison (T-SQL vs DuckDB vs standard) — plus a free-form sandbox. Each lesson has runnable examples and an exercise that you answer by writing a query.It runs against a small synthetic trading dataset (traders, instruments, trades) and leans into DuckDB's friendly-SQL features as teaching moments:
FROM-first queries,GROUP BY ALL,QUALIFY,UNION ALL BY NAME, and literalANTI/SEMI JOIN.How it uses DuckDB-Wasm
selectBundleso it picks the best target per browser.@duckdb/duckdb-wasm@1.33.1-dev45.0(DuckDB v1.5.1 in the tab).Why DuckDB-Wasm made this possible
The pitch of the site is "every number on this page is computed by a real analytical SQL engine running in your browser tab, offline-capable after first load." That's only honest because DuckDB-Wasm is a genuine engine, not a teaching toy —
EXPLAIN ANALYZE, window functions, andROLLUPall behave exactly as they would in a server DuckDB, which is the entire point of a trainer.Huge thanks to the DuckDB-Wasm team — feedback very welcome. 🙏
Beta Was this translation helpful? Give feedback.
All reactions