Search ⌘K
Fitbit
Fitbit

Interview Core Track · Hard · 35 min

Daily Alternating Measurement Totals

Operations needs a daily split between alternating sensor readings. For each day, order measurements by measured_at, add the 1st, 3rd, 5th, and later odd-pos...

Interview Core Track
Hard
35 min
query basics
aggregation
date functions

Company labels are directional practice context, not official interview guidance.

Timer 00:00
Back to practice

Objective

Practice query basics through a Fitbit-tagged business scenario.

Approach

Use this track to improve speed, edge-case handling, and accuracy under timed conditions.

Company context

Company labels are directional practice context, not official interview guidance.

Prereq: query basics
Prereq: filtering

Operations needs a daily split between alternating sensor readings. For each day, order measurements by measured_at, add the 1st, 3rd, 5th, and later odd-positioned readings into odd_total, add the even-positioned readings into even_total, and return measure_day, odd_total, and even_total ordered by measure_day.

measurement_logs
measured_at TIMESTAMP
measurement_value INT
measured_atmeasurement_value
2024-05-01 09:00:005
2024-05-01 10:00:007
2024-05-01 11:00:009
2024-05-02 08:00:004
2024-05-02 09:00:006
2024-05-02 10:00:008
2024-05-02 11:00:0010
Editor
SQL workspace

Run queries against the protected question data, then submit once the result shape looks right.

Sign in to run SQL

Create a free account or sign in before running queries against protected question data.