For each customer, find the quarter in which they made their first purchase in 2023.
CREATE TABLE purchases (purchase_id INTEGER, customer_id INTEGER, purchase_date DATE, amount DECIMAL); INSERT INTO purchases (purchase_id, customer_id, purchase_date, amount) VALUES (1, 101, '2023-02-10', 50.00), (2, 102, '2023-03-15', 75.00), (3, 101, '2023-05-20', 100.00), (4, 103, '2023-07-01', 150.00);
```sql
SELECT 
    customer_id,
    QUARTER(purchase_date) AS first_purchase_quarter
FROM 
    purchases
WHERE 
    purchase_date >= '2023-01-01'
GROUP BY 
    customer_id
ORDER BY 
    MIN(purchase_date);
```
```sql
SELECT 
    customer_id,
    QUARTER(purchase_date) AS first_purchase_quarter
FROM 
    purchases
WHERE 
    purchase_date >= '2023-01-01'
GROUP BY 
    customer_id
ORDER BY 
    MIN(purchase_date);
```