Revature wants to identify customers who remain active across consecutive calendar months. Write a PostgreSQL query that analyzes purchase history and returns every consecutive month pair for each qualifying customer.
| Column | Type | Description |
|---|---|---|
| customer_idPK | INTEGER | Unique customer identifier |
| customer_name | VARCHAR(100) | Customer's name |
| Column | Type | Description |
|---|---|---|
| purchase_idPK | INTEGER | Unique purchase identifier |
| customer_id | INTEGER | References customers.customer_id |
| purchased_at | TIMESTAMP | Timestamp when the purchase occurred |
| amount | NUMERIC(10,2) | Purchase amount |