Jordan Eldredge

An SQL murder mystery

|

In the 2011 film Girl With the Dragon Tattoo our hacker protagonist Lisbeth Salander helps crack the case by hacking into a police department’s database. The movie even captures some hands-on-keyboard database queries.

image.png

Being the nerd I am, I recall thinking that it would actually be pretty cool to get to solve murders via SQL queries!

Well, it turns out several years later I got to! Joon Park and Cathy He have created the fantastic SQL Murder Mystery. It consists of a single SQLite database and a short prompt:

A crime has taken place and the detective needs your help. The detective gave you the crime scene report, but you somehow lost it. You vaguely remember that the crime was a murder that occurred sometime on Jan.15, 2018 and that it took place in SQL City. Start by retrieving the corresponding crime scene report from the police department’s database.

From there you are on your way! It’s delightfully well done for what it is. It doesn’t present much of a challenge for anyone who’s used SQL significantly, but the story is fun and it even features a fun twist ending, so be sure to play to the end!

For more nerd nit-picking of Lisbeth’s use of SQL check out this breakdown on Oracle WTF.