You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECTCOUNT(*)
FROM user_measure_count
WHERE unique_measures >=2;
count
204
Have all 3 measures - blood glucose, weight and blood pressure?
SELECTCOUNT(*)
FROM user_measure_count
WHERE unique_measures =3;
count
50
What is the median systolic/diastolic blood pressure values?
SELECT
PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY systolic) AS median_systolic,
PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY diastolic) AS median_diastolic
FROMhealth.user_logsWHERE measure ='blood_pressure';
median_systolic
median_diastolic
126
79
💻 Key Highlight
Even though this is a short assignment which cover basic SQL syntax, I did run into problems several time during the solving process. However, it helped me to have a better understanding about data exploration using SQL from theories to real life application.
About
This case study is contained within the Serious SQL course by Danny Ma