Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Extracting User Health Metrics

EasySQL · PostgreSQL00:00
Practice interviewer
In session
5 left
00:00

Your question is Extracting User Health Metrics. Start with the requirements and the one table on the right.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.

Problem

Omada Health needs a focused extract of member measurements for care-team review. Write a PostgreSQL query against the health_metrics table to retrieve one member's weight and fasting glucose readings recorded during January 2026.

Requirements

  1. Return only rows for user_id = 1002 where metric_type is weight or fasting_glucose.
  2. Include measurements from January 1 through January 31, 2026, ordered by date and metric type.

Schema

health_metrics
ColumnTypeDescription
metric_idPKINTEGERUnique measurement identifier
user_idINTEGEROmada member identifier
metric_dateDATEDate the measurement was recorded
metric_typeVARCHAR(30)Health metric name
metric_valueNUMERIC(8,2)Recorded numeric value
unitVARCHAR(20)Measurement unit
Tableshealth_metrics
Your solutionPostgreSQL
You need to log in / sign up to run or submit.
Run a query to see results