PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches

Quick Overview

This question evaluates proficiency in time-based aggregations and filtering on order-level transactional data to compute weekly revenue and order counts specifically for standard delivery orders.

  • Medium
  • Instacart
  • Data Manipulation (SQL/Python)
  • Data Scientist

Calculate Weekly Revenue and Order Count for Standard Deliveries

Company: Instacart

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Technical Screen

instacart_orders +----------+---------+---------+------------+---------+--------------+ | order_id | user_id | revenue | created_at | geo | delivery_type| +----------+---------+---------+------------+---------+--------------+ | 1 | 101 | 45.80 | 2023-07-03 | Miami | standard | | 2 | 102 | 23.50 | 2023-07-04 | Miami | ultrafast | | 3 | 103 | 67.20 | 2023-07-05 | Seattle | standard | | 4 | 101 | 15.00 | 2023-07-10 | Miami | standard | | 5 | 104 | 52.30 | 2023-07-10 | Boston | ultrafast | +----------+---------+---------+------------+---------+--------------+ ##### Scenario You must calculate weekly revenue and other summaries from Instacart’s order-level table. ##### Question Write a SQL query that returns, for the last 8 full calendar weeks, total revenue and order count, filtered to standard delivery orders only. ##### Hints Use DATE_TRUNC, WHERE, GROUP BY, ORDER BY.

Quick Answer: This question evaluates proficiency in time-based aggregations and filtering on order-level transactional data to compute weekly revenue and order counts specifically for standard delivery orders.

Last updated: Mar 29, 2026

Loading coding console...

PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.

Related Coding Questions

  • Write SQL to rank advertisers and profitability - Instacart (Medium)
  • Aggregate weekly revenue and attribute 4% drop - Instacart (Medium)
  • Explain handling very large datasets - Instacart (Medium)
  • Pivot transactions by date without date libs - Instacart (Medium)
  • Pivot data without date libraries - Instacart (Medium)