Regional Sales Performance and Customer Lifetime Value Analysis

Company: Boeing Swe on campus_16march

Difficulty: medium

Problem Statement

Regional Sales Performance and Customer Lifetime Value Analysis Problem Description You are given a retail database holding customers, categories, products, orders and order items. Write a single SQLite query that produces a regional sales performance report combining customer-lifetime-value tiers, market-penetration figures and per-customer profitability. Only customers who have placed at least one order with status = 'completed' appear in the report, and every order-derived figure (spending, order counts, categories, dates) is computed from completed orders alone. Orders in any other status are ignored entirely. Schema The five tables are created exactly as shown below. Only the columns listed here exist; there are no keys, indexes or constraints, so nothing prevents an order from having no matching order items. Table: customers Column Type Meaning customer_id INT Unique customer identifier customer_name VARCHAR Customer's full name — unique within a test case email VARCHAR Customer'