Write a SQL query to find the most common first transaction amount bucket.
Use each account's earliest posted transaction, excluding transactions with a NULL amount. Define buckets as < \$50, \$50-\$99.99, \$100-\$199.99, and \$200+. If multiple transactions share a timestamp, use the lower transaction ID as the earlier transaction.
amount_bucket and account_count.| Column | Type | Description |
|---|---|---|
| account_idPK | INT | Unique account identifier |
| created_date | DATE | Date the account was created |
| Column | Type | Description |
|---|---|---|
| transaction_idPK | INT | Unique transaction identifier |
| account_id | INT | Account associated with the transaction |
| occurred_at | TIMESTAMP | Timestamp when the transaction occurred |
| amount | DECIMAL(10,2) | Transaction amount |
| status | VARCHAR(20) | Transaction processing status |