What is your experience with high-transactional data flow in databases?
Using the provided transaction and event data, write a PostgreSQL query that summarizes transaction flow by hour and excludes hours with fewer than two transactions.
flow_hour, total_transactions, successful_transactions, success_rate_pct, avg_latency_ms, and max_latency_ms.| Column | Type | Description |
|---|---|---|
| transaction_idPK | INT | Unique transaction identifier |
| occurred_at | TIMESTAMP | Timestamp when the transaction entered the flow |
| transaction_type | VARCHAR(30) | Transaction classification |
| source_system | VARCHAR(40) | System that originated the transaction |
| amount | NUMERIC(12,2) | Transaction amount |
| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Unique event identifier |
| transaction_id | INT | Referenced transaction identifier |
| status | VARCHAR(20) | Processing outcome |
| latency_ms | INT | Processing latency in milliseconds |