bsc.stats Table: ez_core_metrics_hourly Type: View
What
This aggregated table provides hourly blockchain metrics for high-level analysis and monitoring. It pre-calculates key statistics from fact_transactions to enable fast querying of network activity, gas usage patterns, and user behavior trends without scanning large transaction tables.Key Use Cases
- Network health dashboards and monitoring
- Gas fee trend analysis and volatility tracking
- User adoption metrics and activity patterns
- Blockchain comparison studies across chains
- Activity anomaly detection and congestion analysis
- Performance optimization and capacity planning
- Weekly/monthly growth analysis
Important Relationships
- Derived from fact_transactions: All metrics aggregated from base transaction data
- Join with ez_prices_hourly: For native token price correlation
- Compare across chains: Standardized metrics enable cross-chain analysis
Commonly-used Fields
block_timestamp_hour: Hour boundary for aggregated metricstransaction_count: Total transactions in the hourtransaction_count_success/transaction_count_failed: Success/failure countsunique_from_count: Distinct active addressestotal_fees_native/total_fees_usd: Fee totals in native and USDblock_count: Number of blocks produced
Sample Queries
Network Health Dashboard MetricsColumns
| Column Name | Data Type | Description |
|---|---|---|
| BLOCK_TIMESTAMP_HOUR | TIMESTAMP_NTZ | The hour boundary (UTC) for which metrics are aggregated. Timestamp truncated to hour boundary. Example: ‘2024-01-15 14:00:00.000’ |
| BLOCK_NUMBER_MIN | NUMBER | The lowest block number produced within this hour. Used to identify first block and calculate block ranges. Example: 18750000 |
| BLOCK_NUMBER_MAX | NUMBER | The highest block number produced within this hour. Used to identify last block and monitor chain tip progression. Example: 18750299 |
| BLOCK_COUNT | NUMBER | Total number of blocks produced in the hour. Calculated as blocknumbermax - blocknumbermin + 1. Example: 300 |
| TRANSACTION_COUNT | NUMBER | Total number of transactions included in blocks during this hour. Includes both successful and failed transactions. Example: 125000 |
| TRANSACTION_COUNT_SUCCESS | NUMBER | Number of transactions that executed successfully in the hour. Used to calculate network reliability. Example: 118750 |
| TRANSACTION_COUNT_FAILED | NUMBER | Number of transactions that failed or reverted in the hour. Common causes include insufficient gas or contract reverts. Example: 6250 |
| UNIQUE_FROM_COUNT | NUMBER | Count of distinct addresses that initiated transactions in the hour. Represents active users, not cumulative. Example: 45000 |
| UNIQUE_TO_COUNT | NUMBER | Count of distinct addresses that received transactions in the hour. Includes EOA recipients and contract addresses. Example: 52000 |
| TOTAL_FEES_NATIVE | FLOAT | Sum of all transaction fees paid in the blockchain’s native token. May have limited precision due to aggregation. Example: 125.75 |
| TOTAL_FEES_USD | FLOAT | Sum of all transaction fees paid, converted to USD using hourly native token price. Rounded to 2 decimal places. Example: 425000.50 |
| EZ_CORE_METRICS_HOURLY_ID | TEXT | Primary key - unique identifier for each row ensuring data integrity. Format: Usually VARCHAR containing composite key generated using MD5 hash of the relevant columns. Example: MD5(blocknumber, txhash, trace_index) Usage: Deduplication in incremental loads Join operations for data quality checks Troubleshooting specific records Important: Implementation varies by table - check table-specific documentation. |
| INSERTED_TIMESTAMP | TIMESTAMP_NTZ | UTC timestamp when the record was first added to the Flipside database. Format: TIMESTAMP_NTZ Use Cases: Data freshness monitoring Incremental processing markers Debugging data pipeline issues SLA tracking Query Example: |
| MODIFIED_TIMESTAMP | TIMESTAMP_NTZ | UTC timestamp of the most recent update to this record. Format: TIMESTAMP_NTZ Triggers for Updates: Data corrections Enrichment additions Reprocessing for accuracy Schema migrations Monitoring Usage: |