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...
Company labels are directional practice context, not official interview guidance.
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.
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 | measurement_value |
|---|---|
| 2024-05-01 09:00:00 | 5 |
| 2024-05-01 10:00:00 | 7 |
| 2024-05-01 11:00:00 | 9 |
| 2024-05-02 08:00:00 | 4 |
| 2024-05-02 09:00:00 | 6 |
| 2024-05-02 10:00:00 | 8 |
| 2024-05-02 11:00:00 | 10 |
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.