CVS Health
Analytics Reporting Track · Medium · 25 min
Vendor Delivery Gaps
The supply team wants to review long breaks between deliveries. For each vendor_id, return rows where the gap between one delivery and the previous delivery ...
Company labels are directional practice context, not official interview guidance.
Objective
Practice query basics through a CVS Health-tagged business scenario.
Approach
Use this track to train on SQL that mirrors day-to-day analytics workflows and recurring reporting asks.
Company context
Company labels are directional practice context, not official interview guidance.
The supply team wants to review long breaks between deliveries. For each vendor_id, return rows where the gap between one delivery and the previous delivery is more than 10 days. Output vendor_id, previous_delivery, delivered_on, and gap_days. Sort by vendor_id, then delivered_on.
vendor_deliveries
| vendor_id | delivered_on |
|---|---|
| 10 | 2024-04-01 |
| 10 | 2024-04-05 |
| 10 | 2024-04-22 |
| 20 | 2024-04-03 |
| 20 | 2024-04-10 |
| 20 | 2024-04-25 |
| 30 | 2024-04-07 |
| 30 | 2024-04-15 |
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.