sql-mysteries/README.md

36 lines
2.9 KiB
Markdown
Raw Normal View History

2018-03-09 02:03:37 +01:00
# SQL Murder Mystery
2018-01-17 17:26:34 +01:00
2018-03-07 21:23:01 +01:00
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.
2018-03-09 02:03:37 +01:00
## What You Need
* **sql-murder-mystery.db**: This SQLite database file contains all the data that you will be working with.
2018-03-09 14:39:00 +01:00
* **prompt**: Depending on your experience level with SQL, find the prompt in either the [prompt_experienced](https://github.com/NUKnightLab/sql-mysteries/blob/master/prompt_experienced.pdf) file or the [prompt_beginner](https://github.com/NUKnightLab/sql-mysteries/blob/master/prompt_beginner.pdf) file.
* **[reference](https://github.com/NUKnightLab/sql-mysteries/blob/master/reference.pdf)**: This is a crash course on SQL concepts and commands.
2018-06-14 16:48:59 +02:00
* **a SQLite environment of your choice**: For beginners, we recommend using [SQLiteStudio](https://sqlitestudio.pl/index.rvt), 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](https://sql-murder-mystery.datasette.io/sql-murder-mystery) published by [Simon Willison](https://simonwillison.net/) using his awesome [Datasette](https://datasette.readthedocs.io/) tool. If you do that, just download the [beginner](https://github.com/NUKnightLab/sql-mysteries/blob/master/prompt_beginner.pdf) or [experienced](https://github.com/NUKnightLab/sql-mysteries/blob/master/prompt_experienced.pdf) prompt file and get started.
2018-03-09 02:03:37 +01:00
## Getting Started
2018-08-30 16:35:36 +02:00
* **For SQL beginners**: start with the reference, read the [prompt_beginner](https://github.com/NUKnightLab/sql-mysteries/blob/master/prompt_beginner.pdf) file, then get started by [installing SQLiteStudio and loading the db file](https://github.com/NUKnightLab/sql-mysteries/blob/master/sqlite_studio.pdf). If you get stuck at any point, feel free to refer back to the reference, or file a [GitHub issue](https://github.com/NUKnightLab/sql-mysteries/issues) so we can know where our instructions need to be improved.
* **For experienced SQL users**: read the [prompt_experienced](https://github.com/NUKnightLab/sql-mysteries/blob/master/prompt_experienced.pdf) 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)!
2018-03-07 21:23:01 +01:00
2018-03-09 02:03:37 +01:00
## Checking the Solution
2018-03-07 21:23:01 +01:00
Write the following queries in your SQL environment to check whether you've found the right murderer:
2018-03-09 14:39:00 +01:00
```SQL
INSERT INTO solution VALUES (1, "Insert the name of the person you found here");
2018-03-07 21:23:01 +01:00
2018-03-09 14:39:00 +01:00
SELECT value FROM solution;
```
2018-03-07 21:23:01 +01:00
2018-03-09 02:03:37 +01:00
## Authors
2018-03-07 21:23:01 +01:00
Joon Park
Cathy He
2018-03-09 02:03:37 +01:00
## Inspiration
This murder mystery was inspired by [a crime in the neighboring Terminal City](https://github.com/veltman/clmystery "command-line murder mystery").