Published
Edited
Jun 16, 2022
15 forks
11 stars
Also listed in…
SQL Mystery Game
Insert cell
Insert cell
Insert cell
// we've loaded the sqlite file and made it accessible as a database in this notebook
db = FileAttachment("sql-murder-mystery.db").sqlite()
Insert cell
// you can see the tables available for querying
db.describe()
Insert cell
Insert cell
Insert cell
db
SELECT date,type,city,description
FROM crime_scene_report
Insert cell
Insert cell
db
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
db
INSERT INTO solution VALUES (1, 'SUSPECT NAME HERE');
SELECT value FROM solution
Insert cell
Insert cell
Insert cell
// uncomment the line below to see a schema diagram of the database!
// diagram(db)
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more