Skip to content

A crime has taken place and the detective needs your help. The detective gave you the crime scene report, but you somehow lost it.

Notifications You must be signed in to change notification settings

iamasprout/Detective-SQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Detective-SQL

image

Case Study

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.

Data

Follow these steps to solve this challenge:

Download the sql-murder-mystery.db file here Visit www.sqliteonline.com Click on file, then open db and load in the database file you downloaded above Write your SQL queries to see the different tables and the content

Tools

SQLiteonline.com

Entity Relationship Diagram

Since We are analysing with SQL it is best that we know the relationship between our tables. we can always get that. I Published a document concerning that you can read up here

schema (2)

Analysis

We need to note the some few things;

  • Date was on Jan.15, 2018.
  • Location was SQL City.

Firstly checking if the details exist in the database

image

since it does i would love to know the description

Security footage shows that there were 2 witnesses. The first witness lives at the last house on "Northwestern Dr". The second witness, named Annabel, lives somewhere on "Franklin Ave".

So with this lead i need to get to the two witness the first witness

image

the second witness

image

the next thing i decided to do was to check the witnesses account

image

the first witness said

I heard a gunshot and then saw a man run out. He had a "Get Fit Now Gym" bag. The membership number on the bag started with "48Z". Only gold members have those bags. The man got into a car with a plate that included "H42W".

Second said:

I saw the murder happen, and I recognized the killer from my gym when I was working out last week on January the 9th.

Since they were both related to gym i decided to go futher to investigate the first witness account

image

we are getting close to knowing who the murderer is but we can't just nail him based on one witness when we have two let's confirm if it mattches the other witness report

image

so i need to check if the two witnessess account matches

image\

so finally we can say the killer if Jeremy Bowers

Never imagined this. He was already interviewed and he confessed to the Murder

image

Saying _I was hired by a woman with a lot of money. I don't know her name but I know she's around 5'5" (65") or 5'7" (67"). She has red hair and she drives a Tesla Model S. I know that she attended the SQL Symphony Concert 3 times in December 2017. _

so we need to get the woman that hired Jeremy .

image

While we already know the killer we now get to know the person that hired him was Miranda Priestly

and according to jeremy i decided to go futher to check hoe rich she was and lo and behold she was part of the top 50 Richest in SQL City to be precise she is the 47 richest person in the city.

If you're able to follow along or like it here please do give a star and follow me on Linkedin ,Medium and Twitter

About

A crime has taken place and the detective needs your help. The detective gave you the crime scene report, but you somehow lost it.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published