MURDER MYSTERY WITH SQL

Introduction

The SQL Murder Mystery is an engaging SQL exercise designed to flex SQL skills through a fun and interactive crime-solving scenario. Developed by the Knight Lab at Northwestern University, this mystery challenges participants to use SQL queries to investigate a fictional murder that occurred in SQL City on January 15, 2018. By exploring the database, analyzing clues, and piecing together evidence, participants can identify the culprit and solve the case.

The primary objective of the SQL Murder Mystery is to solve the murder case that is unsolved with the use of SQL to query the crime database . It entirely entails:

  1. Exploring Database Structure: Understand the layout and relationships within the database by examining tables and their schemas.

  2. Retrieve and Analyze Data: Use SQL queries to extract relevant information from the database, such as crime scene reports, witness statements, and suspect details.

  3. Identify Patterns and Clues: Analyze the data to uncover patterns and connections that point to the suspect.

  4. Solve the Mystery: Combine the gathered evidence to determine the identity of the murderer and understand the motive behind the crime.

Here is the Entity Relationship Diagram to the database.


FINDING THE KILLER

From the clues left with, the murder occurred in SQL City on January 15, 2018

Our search leads us to two witnesses whom we have to look to in the person table
WITNESS 1

WITNESS 2

It becomes imperative to check the interviews of these witnesses

Taking into consideration the descriptive words both witnesses used in telling their side of the story from the query result:

I take the initiative to check this Person of Interest out and cross check if they have been interviewed:

This Person of Interest checks out as the culprit and his interview Transcript indicates there is also an accomplice whom we will find out according to Jeremy Bowers’ confession and description

Success!!!

The Culprit; Jeremy Bowers and the Mastermind Miranda Priestly are both complicit and the Murder Mystery has been resolved!

To access source code, click here