Inspired by @veltman's command-line mystery, use SQL to research clues and find out whodunit!
Go to file
Joe Germuska da49fb70f2 WIP
2019-10-10 08:54:02 -05:00
css WIP 2019-10-10 08:54:02 -05:00
scripts WIP 2019-10-10 08:54:02 -05:00
174092-clue-illustration.png WIP 2019-10-10 08:54:02 -05:00
index.html WIP 2019-10-10 08:54:02 -05:00
LICENSE Create LICENSE 2018-01-17 10:26:09 -06:00
prompt_beginner.pdf Update README and add cheatsheet and prompts 2018-03-08 19:01:06 -06:00
prompt_experienced.pdf Minor clarifications and additions to pdfs 2018-04-05 14:37:38 -05:00
README.md Add reference to hosted datasette version. 2019-10-07 09:50:41 -05:00
reference.pdf Minor clarifications and additions to pdfs 2018-04-05 14:37:38 -05:00
requirements.txt WIP 2019-10-10 08:54:02 -05:00
schema.png WIP 2019-10-10 08:54:02 -05:00
sql-murder-mystery.db Add clarification that height is in inches 2018-04-05 14:58:56 -05:00
sqlite_studio.pdf Minor clarifications and additions to pdfs 2018-04-05 14:37:38 -05:00
walkthrough.html WIP 2019-10-10 08:54:02 -05:00

SQL Murder Mystery

There's been a Murder in SQL City! The SQL Murder Mystery is designed to be both a self-directed lesson to learn SQL concepts and commands and a fun game for experienced SQL users to solve an intriguing crime.

What You Need

  • sql-murder-mystery.db: This SQLite database file contains all the data that you will be working with.
  • prompt: Depending on your experience level with SQL, find the prompt in either the prompt_experienced file or the prompt_beginner file.
  • reference: This is a crash course on SQL concepts and commands.
  • a SQLite environment of your choice: For beginners, we recommend using SQLiteStudio, which is a good graphical interface to use to inspect your data and write queries.

NEW: If you don't want to install anything, you can query a web-based version of the database published by Simon Willison using his awesome Datasette tool. If you do that, just download the beginner or experienced prompt file and get started.

Getting Started

  • For SQL beginners: start with the reference, read the prompt_beginner file, then get started by installing SQLiteStudio and loading the db file. If you get stuck at any point, feel free to refer back to the reference, or file a GitHub issue so we can know where our instructions need to be improved.

  • For experienced SQL users: read the prompt_experienced file, then download the sql-murder-mystery.db file and use a SQL environment of your choice to solve the mystery. You can use the reference to refresh your memory of SQL. Try to complete the activity all within your SQL environment (without writing down notes)!

Checking the Solution

Write the following queries in your SQL environment to check whether you've found the right murderer:

INSERT INTO solution VALUES (1, "Insert the name of the person you found here");

SELECT value FROM solution;

Authors

Joon Park

Cathy He

Inspiration

This murder mystery was inspired by a crime in the neighboring Terminal City.