Jack Noble Résumé
Back to Project Lab

Project Lab / SQL.js + SQLite

Basketball SQL explorer

Ask a question. Write real SQL. Inspect five championship seasons.

Queries run locally in a disposable database. Explore regular-season records from the verified five-team Championship DNA sample.

Read Championship DNA

Explore the sample

JavaScript, Web Workers and WebAssembly are required to execute queries. The schema, sample rows and Python instructions below remain available.

Examples demonstrate filters, sorting, calculations, aggregates and grouping.

One SELECT or WITH query · 2-second execution limit · up to 200 rows, 30 columns and 64,000 output characters. Cells over 2,000 characters are shortened. Binary values show their byte length.

Query results

Waiting for SQL.js initialization.

CSV exports contain the displayed result, including any truncation. Text and headers that could be interpreted as spreadsheet formulas receive a leading apostrophe.

Five champions, a focused dataset.

The published Championship DNA case examines 11 champions and 330 team-seasons. This application uses the separate five-team SQLite sample and cannot reproduce the full study, predict champions, or compare champions with non-champions.

Verified source records
Team Year Wins Losses
2024 Celtics 2024 64 18
2020 Lakers 2020 52 19
2023 Nuggets 2023 53 29
2022 Warriors 2022 53 29
2021 Bucks 2021 46 26
Sources, safeguards and reproducibility

The database preserves the championship_teams schema from the Python SQLite example. The source CSV links each record to its NBA source. Run python projects/championship-dna/analyze.py from the repository root to reproduce the default win-percentage comparison.

SQL.js 1.17.0 is hosted locally under the MIT license. Each execution starts a fresh Web Worker and in-memory database. SQLite query-only mode and a subquery wrapper prevent writes. A 16 MiB SQLite heap limit and the worker deadline limit resource use. Startup has a separate 15-second deadline. Time shown covers statement preparation and iteration, excluding initialization.

The result limit bounds display size. A costly query can still exhaust worker resources; Reset or a new query starts fresh. Queries are never sent to a server or persisted. WebAssembly and Web Workers are required.