Instacart Data Manipulation (SQL/Python) Interview Questions
Master your tech interview with our curated database of real questions from top companies.
Calculate Weekly Revenue and Order Count for Standard Deliveries
instacart_orders +----------+---------+---------+------------+---------+--------------+ | order_id | user_id | revenue | created_at | geo | delive...
Write SQL to rank advertisers and profitability
You are given two denormalized tables. Use ANSI SQL (CTEs allowed) and UNPIVOT (or an equivalent UNION ALL approach if UNPIVOT is unavailable). Table:...
Aggregate weekly revenue and attribute 4% drop
Write SQL over the following schema to: (A) compute weekly revenue by ISO week (Monday–Sunday) from orders, excluding cancelled/refunded; revenue_usd ...
Explain handling very large datasets
Describe a project where you ingested and processed a dataset of at least 500 million rows or 1 TB end-to-end. Detail storage formats and partitioning...
Pivot transactions by date without date libs
Given a stream of transaction rows (shopper_id, date_str, amount) where date_str is ISO format 'YYYY-MM-DD', produce a pivoted report for a specified ...
Pivot data without date libraries
Transform a tall dataset into a wide, pivoted view without using any date/time libraries. Input: a list of records (date, store_id, metric, value) whe...
Implement a pivot table transformation
Given a dataset of transactions with columns: user_id (string), category (string), subcategory (string), amount (float), ts (ISO timestamp), implement...