Problem
Write a PostgreSQL query that compares each customer's latest active month on ACME House with their own prior 3-month baseline. Use only completed orders, aggregate behavior by calendar month, and return customers only when a full 3-month history exists.
Schema
| Column | Type | Description |
|---|---|---|
| order_id | INT | |
| customer_id | INT | |
| order_date | DATE | |
| order_status | VARCHAR(20) | |
| order_amount | NUMERIC(10,2) | |
| channel | VARCHAR(20) |
You are practicing as a guest. Sign up free to run your code against the sample data. Your draft stays right here.

