All tasks

Statistics of Customers' First Purchases

Advanced

Task level: Amazon/E-commerce. **Condition:** Analyze customers' first purchases: average order value, most popular category, day of the week. **Tables:** - ecommerce_orders (order_id, customer_id, order_date, total_amount, ...) - order_items (order_id, product_id, ...) - ecommerce_products (product_id, category_id, ...) **Requirements:** 1. Identify the first order of each customer 2. Calculate: avg_first_order_amount, most_common_first_category, most_common_weekday 3. Compare with averages so far

Category
Subqueries
Estimated time
~30 min
Databases
PostgreSQLGreenplum
Tags
FAANGInterviewFirst PurchaseCohortAnalyticsподзапросы

Sign in to solve

Start Solving