CVS Health·Data Scientist·Technical Phone Screen
Jun 2026
CVS Health data scientist technical screen, PostgreSQL heavy. Five distinct tasks covering schema design, data insertion, aggregation queries, date windowing, and a DML update. No behavioral stuff at all, just straight SQL the whole time.
- Design a normalized e-commerce schema in PostgreSQL with products, customers, orders, and order_items tables. Use minimal correct types and include appropriate constraints like primary keys, foreign keys, NOT NULL, UNIQUE, and CHECK constraints.
- Write a query to compute per-customer gross revenue for paid orders placed in August 2025. Include customers with zero revenue as 0, and sort results by revenue descending then customer_id ascending.
- List all products that appear in non-refunded, non-cancelled orders placed within the last 7 days relative to a fixed reference date of September 1, 2025. Return the product id, name, and the earliest order date within that window.
- Write an UPDATE statement that sets coupon_code to 'NONE' for all paid orders from August 2025 where coupon_code is currently NULL. Then write a SELECT to verify the count of affected rows.
- Given ASCII table samples, write INSERT statements that exactly reproduce the provided data across all four tables, respecting foreign key relationships and insertion order.
“The 'minimal correct types' phrasing tripped me up a bit.” The rest of the author's notes on Data Scientist interview at CVS Health, Technical Phone Screen round, covers how they worked through the question, what the panel pushed back on, and what they would do differently.
View Post