Mini Case Study is from Danny Ma's 8 Week SQL Challenge
The Objective of this case study is to debug SQL code and assist the General Manager of Health Analytics in answering questions for a board meeting.
Prior to answering the questions, SQL best practices encourage understanding the dataset and its fields.
This dataset includes 6 columns which are named as id, log_date, measure, measure_value, systolic, and diastolic. How this was determined by running this query (See Below).
Due to the large amount of data, I was initally unsure of how many measures were present, running the query below displayed 3 measures blood_glucose, blood_pressure, weight.
Questions 1-9 will be displayed as screenshots of the the incorrect code followed by screenshots of the correct code.
Q.1
Q.2-8
Q.2
Q.3
Q.4
Q.5
Q.6
Q.7
Q.8
Q.9