FreePro237 ProblemsSQL + Python
Retail SQL & Python Interview Questions
E-commerce and retail analytics covers inventory management, customer lifetime value, basket analysis, and supply chain performance across millions of SKUs. These SQL and Python challenges are modeled after data work at Amazon, Walmart, Target, Shopify, eBay, Etsy, Wayfair, Kroger, Costco, Best Buy, Home Depot, IKEA, and more. Master funnel analysis, cohort retention, demand forecasting, and merchandising metrics.
Top Companies Hiring in Retail
Questions are relevant for real analytics problems data science teams solve at these companies.
Difficulty Distribution
Easy
68
29% of problems
Medium
104
44% of problems
Hard
58
24% of problems
Expert
7
3% of problems
What You'll Practice
Customer lifetime value
Basket & cart analysis
Inventory management metrics
Funnel conversion analysis
Cohort retention
Product performance
Supply chain KPIs
Promotional analysis
Topics Covered
SQL· 10
aggregationbasic queries filteringcleaning transformdate timefilteringjoinsscenario sqlset operationssubqueries cteswindow functions
Python· 12
eda statisticsfeature engineeringpandas aggregationpandas applypandas basicspandas cleaningpandas datetimepandas filteringpandas mergingpandas reshapingpandas scenariopandas window
All Problems237 total
01
Premium Products Within a SegmentFree
SQLEasy02US Customers With Missing PhoneFree
SQLEasy03High-Value US Orders (Shipped/Delivered)Free
SQLMedium04Orders Flagged for Fraud ReviewFree
SQLHard05Active Home Products in Mid-Price BandFree
SQLEasy06California (US) Customers with a Phone NumberFree
SQLEasy07Confirmed Orders With Captured ChargeFree
SQLEasy08Captured Payments via Mobile WalletsFree
SQLEasy09Delivered Shipments Using Two-Day ServiceFree
SQLEasy10Backorderable Inventory With Low Available UnitsFree
SQLEasy11Digital Orders With Successful CollectionFree
SQLEasy12Inactive Low-Priced ProductsFree
SQLEasy13In-Transit Shipments Without Delivery DateFree
SQLEasy14US Orders With Captured Charge (High-Value)Free
SQLMedium15Active Products That Have Been OrderedFree
SQLMedium16Captured Orders With At Least One Bulk LineFree
SQLMedium17Delivered Shipments Backed by Captured ChargeFree
SQLMedium18US Customers With At Least One Captured OrderFree
SQLMedium19US Orders With Any Two-Day ShipmentFree
SQLMedium20Captured Payments for Delivered OrdersFree
SQLMedium21Active Home Products Never OrderedFree
SQLMedium22Captured Orders That Include Returned ItemsFree
SQLMedium23US CA/NY Customers With Any Ship-Method OrderFree
SQLMedium24In-Transit Shipments With Captured PaymentsFree
SQLMedium25Latest Captured Payment Per CustomerFree
SQLHard26Highest-Value Line Per Delivered OrderFree
SQLHard27Top Customers by Recent Billed AmountFree
SQLMedium28Delivered Orders CountFree
SQLEasy29Total Billed Amount for Delivered OrdersFree
SQLEasy30Average Billed for Delivered OrdersFree
SQLEasy31Max Shipping Fee for Physical ShipmentsFree
SQLEasy32Captured Payments Orders CountFree
SQLEasy33Canceled Orders CountFree
SQLEasy34Total Tax on Delivered OrdersFree
SQLEasy35Delivered Orders by StateFree
SQLMedium36Captured Payments by MethodFree
SQLMedium37Active Products by CategoryFree
SQLMedium38Avg Shipping Fee by Service Level (Delivered)Free
SQLMedium39Delivered Revenue by CityFree
SQLMedium40Recent Delivered Orders by State (60 Days)Free
SQLMedium41Units Delivered by ProductFree
SQLMedium42Captured Amount by Customer (Delivered Orders)Free
SQLMedium43Top Customers by Recent Captured Revenue (90 Days)Free
SQLHard44Top Products by Recent Units Delivered (90 Days)Free
SQLHard45Orders Above Average BilledFree
SQLEasy46Products Above Category Average PriceFree
SQLEasy47Lowest Priced Products per CategoryFree
SQLEasy48Customers’ Highest-Billed OrdersFree
SQLEasy49Products Below Average WeightFree
SQLEasy50Customers With Recent Delivered Orders (60 Days)Free
SQLMedium51Products Without Delivered Line ItemsFree
SQLMedium52Orders Above Average Within Shipping TierFree
SQLMedium53Orders With a Captured PaymentFree
SQLMedium54Customers Without Refunds in the Last 90 DaysFree
SQLMedium55Delivered Shipments by CarrierFree
SQLMedium56Products With Deliveries But No Returns (Last 120 Days)Free
SQLHard57Top Two Recent Delivered Orders per CustomerFree
SQLMedium58Delivered US Purchases by RecencyFree
SQLEasy59Largest Captured Payments — Recent FirstFree
SQLEasy60Active Products by PriceFree
SQLEasy61Latest Captured Payment per PurchaseFree
SQLMedium62Top 3 Delivered Purchases per StateFree
SQLMedium63Top Two Line Items per PurchaseFree
SQLMedium64Two Newest Active Items per CategoryFree
SQLMedium65Latest Delivered Shipment per PurchaseFree
SQLMedium66Top Two Captured Payments per MethodFree
SQLMedium67Customer Running Spend — Last 90 DaysFree
SQLHard68Top 3 Line Items per Product — Last 60 DaysFree
SQLHard69Recently Delivered Shipments (Newest First)Free
SQLEasy70All Orders by Most RecentFree
SQLEasy71Orders Placed in the Last 30 DaysFree
SQLMedium72Payments Captured in the Last 7 DaysFree
SQLMedium73Most Recent Captured Payment per Customer (Last 60 Days)Free
SQLHard74Standardize Customer ContactsFree
SQLEasy75Normalize Product SKUs and NamesFree
SQLEasy76Standardize Order Status and Shipping FieldsFree
SQLEasy77Recent Captured Payments (Normalized)Free
SQLMedium78Normalized Order Items for Active ProductsFree
SQLMedium79Delivered Shipments (Normalized)Free
SQLMedium80Delivered Orders with Latest Capture (Normalized)Free
SQLHard81Customers from US or CanadaFree
SQLEasy82Orders from California or Texas (All)Free
SQLEasy83Active Products from Electronics or HomeFree
SQLMedium84Customers with Delivered Orders AND Captured PaymentsFree
SQLMedium85Products Ordered But Never ReturnedFree
SQLMedium86Customers with Orders but No Captured PaymentsFree
SQLHard87Active vs Inactive Product Analysis with CTEsFree
SQLHard88Premium Merchandising ItemsFree
SQLEasy89Captured Payments for In-Progress OrdersFree
SQLMedium90Select Product ColumnsFree
PYTHONEasy91Filter Delivered OrdersFree
PYTHONEasy92Sort Customers by NameFree
PYTHONEasy93Filter Premium ElectronicsFree
PYTHONMedium94Filter Completed OrdersFree
PYTHONMedium95Filter Mid-Range ProductsFree
PYTHONMedium96Filter US Customers with Phone NumbersFree
PYTHONHard97Filter Electronics ProductsFree
PYTHONEasy98Filter Delivered OrdersFree
PYTHONEasy99Filter Products by Price RangeFree
PYTHONMedium100Filter High-Value Delivered OrdersFree
PYTHONMedium101Filter Products by Brand NameFree
PYTHONHard102Count Products by CategoryFree
PYTHONEasy103Total Revenue by Order StatusFree
PYTHONEasy104Average Price by CategoryFree
PYTHONEasy105Order Statistics by StatusFree
PYTHONMedium106Find Repeat CustomersFree
PYTHONMedium107Price Extremes by CategoryFree
PYTHONMedium108Category Price Range AnalysisFree
PYTHONMedium109Customer Order SummaryFree
PYTHONMedium110Product Price as Percentage of Category TotalFree
PYTHONHard111Orders with Customer AverageFree
PYTHONHard112Top Product per CategoryFree
PYTHONHard113Merge Orders with CustomersFree
PYTHONEasy114Order Items with Product NamesFree
PYTHONEasy115Customers with Order CountsFree
PYTHONEasy116Find Orphan RecordsFree
PYTHONMedium117High Value Customers OrdersFree
PYTHONMedium118Revenue by CategoryFree
PYTHONMedium119Order Items Full DetailsFree
PYTHONMedium120Find Unmatched ProductsFree
PYTHONMedium121Customer Lifetime ValueFree
PYTHONHard122Order Share of Customer TotalFree
PYTHONHard123Pivot Orders by StatusFree
PYTHONEasy124Pivot Revenue by Category and StatusFree
PYTHONMedium125Pivot Order Metrics by CountryFree
PYTHONHard126Rank Orders by AmountFree
PYTHONEasy127Rolling Sum of Order RevenueFree
PYTHONMedium128Rolling Average with Min PeriodsFree
PYTHONMedium129Dense Rank Products by PriceFree
PYTHONMedium130Percent Rank Orders by AmountFree
PYTHONMedium131Multiple Window Functions on OrdersFree
PYTHONHard132Extract Order Date PartsFree
PYTHONEasy133Calculate Shipping DaysFree
PYTHONMedium134Group Orders by QuarterFree
PYTHONMedium135Drop Customers Missing PhoneFree
PYTHONEasy136Uppercase Product CategoriesFree
PYTHONEasy137Fill Missing Delivery DatesFree
PYTHONMedium138Strip Whitespace from NamesFree
PYTHONMedium139Convert Active Flag to BooleanFree
PYTHONMedium140Multi-Step Customer CleanupFree
PYTHONHard141Categorize Product PricesFree
PYTHONEasy142Calculate Dynamic DiscountsFree
PYTHONMedium143Calculate Effective Price per ItemFree
PYTHONMedium144Delivered Orders by CityFree
PYTHONEasy145Customer Order AnalysisFree
PYTHONMedium146Order Fulfillment AnalysisFree
PYTHONMedium147Customer 360 ViewFree
PYTHONHard148Active Electronics ProductsPro
SQLEasy149High-Value Orders Above $5KPro
SQLEasy150Prime Platinum CustomersPro
SQLEasy151Canceled Orders With Promo CodePro
SQLEasy152Active Sellers With High RatingPro
SQLMedium153Orders With Customer DetailsPro
SQLEasy154Order Items With Product InfoPro
SQLMedium155Shipments With Carrier and WarehousePro
SQLMedium156Payments With Order and Customer ContextPro
SQLMedium157Products Never OrderedPro
SQLMedium158Customers With No Shipped OrdersPro
SQLHard159Order Count by StatusPro
SQLEasy160Total Revenue by Product CategoryPro
SQLMedium161Avg Order Value by Loyalty TierPro
SQLMedium162Return Rate by SellerPro
SQLMedium163Top 5 Customers by Total SpendingPro
SQLHard164Sellers With High Cancellation RatePro
SQLHard165Rank Sellers by RevenuePro
SQLMedium166Customer Order Sequence NumberPro
SQLMedium167Daily Revenue Running TotalPro
SQLHard168Top Product per Category by RevenuePro
SQLHard169Carrier Shipping Cost 3-Shipment Moving AveragePro
SQLHard170Order Value Change From Prior OrderPro
SQLHard171Order Value Quartile AnalysisPro
SQLHard172Products Priced Above Category AveragePro
SQLMedium173Customers With Both Orders and ReturnsPro
SQLHard174Latest Order per CustomerPro
SQLHard175Seller Revenue With Rank via CTEPro
SQLHard176Categories With Above-Average RevenuePro
SQLHard177Recent Orders (Last 30 Days)Pro
SQLEasy178Monthly Order Volume TrendPro
SQLMedium179Average Delivery Lead Time by Service LevelPro
SQLMedium180Late Deliveries by CarrierPro
SQLHard181Orders With Shipping Speed CategoryPro
SQLEasy182Products With Weight Tier LabelPro
SQLMedium183Customer Tier With Order SummaryPro
SQLHard184Products Needing Attention — Low Stock or ReturnedPro
SQLMedium185Sellers With Orders But No ReturnsPro
SQLMedium186Seller Performance ScorecardPro
SQLHard187Order Fulfillment Funnel AnalysisPro
SQLHard188Customer Lifetime Value SummaryPro
SQLHard189Return Financial Impact AnalysisPro
SQLHard190Warehouse Inventory Health ReportPro
SQLExpert191Marketplace Operations DashboardPro
SQLExpert192Prime vs Standard Customer AnalysisPro
SQLExpert193Active Product CatalogPro
PYTHONEasy194Order Status CountsPro
PYTHONEasy195Seller Category SummaryPro
PYTHONMedium196Customer Loyalty BreakdownPro
PYTHONMedium197Delivered Ship OrdersPro
PYTHONEasy198High-Value OrdersPro
PYTHONEasy199Prime Customers in Target StatesPro
PYTHONMedium200Returned Items With ReasonPro
PYTHONMedium201Items Per OrderPro
PYTHONEasy202Revenue by Product CategoryPro
PYTHONMedium203Average Order Value by Fulfillment TypePro
PYTHONMedium204Seller Sales PerformancePro
PYTHONHard205Warehouse Inventory SummaryPro
PYTHONHard206Orders With Customer NamesPro
PYTHONEasy207Order Items With Product DetailsPro
PYTHONMedium208Products Without OrdersPro
PYTHONMedium209Shipment Tracking With CustomerPro
PYTHONHard210Full Order Detail ReportPro
PYTHONHard211Rank Customers by SpendingPro
PYTHONMedium212Running Total Revenue per SellerPro
PYTHONMedium2137-Day Moving Average Order ValuePro
PYTHONHard214Daily Revenue Change PercentagePro
PYTHONHard215Extract Order Month and YearPro
PYTHONEasy216Shipping Duration in DaysPro
PYTHONMedium217Monthly Order Volume by Fulfillment TypePro
PYTHONHard218Fill Missing Phone NumbersPro
PYTHONEasy219Normalize Product PricesPro
PYTHONMedium220Standardize Carrier and Service Level DataPro
PYTHONHard221Pivot Order Counts by Status and FulfillmentPro
PYTHONMedium222Revenue Pivot by Category and SellerPro
PYTHONHard223Classify Orders by Value TierPro
PYTHONMedium224Order Priority ScorePro
PYTHONHard225Compute Discount Rate Per OrderPro
PYTHONMedium226Order Value Quartile BucketingPro
PYTHONHard227Product Volume FeaturesPro
PYTHONHard228Customer Feature MatrixPro
PYTHONExpert229Inventory Health FeaturesPro
PYTHONHard230Order Value Descriptive StatisticsPro
PYTHONMedium231Price vs Quantity CorrelationPro
PYTHONHard232Anomalous Order Value Detection (IQR)Pro
PYTHONHard233Seller Performance ScorecardPro
PYTHONHard234Customer Lifetime ReportPro
PYTHONHard235Fulfillment Pipeline AnalysisPro
PYTHONExpert236Product Health DashboardPro
PYTHONExpert237End-to-End Order ReportPro
PYTHONExpertReady to practice Retail?
237 SQL and Python challenges built from real retail data. Graded instantly in your browser — no setup required.