Identify High-Value Customers With CTE

Medium
ctes Amazon Shopify Stripe

Using a CTE, identify customers whose total order amount exceeds 1000. Return customer_id, name, and total_spent, ordered by total_spent descending.

Expected Output: Customers with total spend > 1000.

Tables

Hints (3 available)

SQL Editor

Output

Click "Run" to see results...