PolygonBlocks
Column Descriptions
for polygon.blocks
37 rows
Name | Type | Description |
---|---|---|
parent_hash | TEXT | Hash of the parent block |
receipts_root | TEXT | Merkle root of the transaction receipts in the block |
difficulty | NUMBER | Difficulty of the block |
detail_level | TEXT | Detail level of the block data |
hash | TEXT | Hash of the block |
gas_limit | NUMBER | Gas limit of the block |
transactions_root | TEXT | Merkle root of the transactions in the block |
miner | TEXT | Address of the miner who mined the block |
total_balance_changes | NUMBER | Total number of balance changes in the block |
date | DATE | Date of the block |
number | NUMBER | Block number |
blob_gas_used | NUMBER | Blob gas used by all blob transactions in the block |
logs_bloom | TEXT | Bloom filter for the logs in the block |
nonce | NUMBER | Nonce of the block |
ommers_hash | TEXT | Hash of the ommers (uncles) of the block |
time | TIMESTAMP_NTZ | Timestamp of the block |
extra_data_utf8 | TEXT | Extra data included in the block header, interpreted as UTF-8 |
withdrawals_root | TEXT | Merkle root of the withdrawals in the block |
blob_transactions | ARRAY | Number of blob transactions in the block |
gas_used | NUMBER | Gas used by all transactions in the block |
total_transactions | NUMBER | Total number of transactions in the block |
state_root | TEXT | Merkle root of the state trie after the block was processed |
mix_hash | TEXT | Mix hash of the block |
detail_level_code | NUMBER | Numeric code representing the detail level of the block data |
base_fee_per_gas | TEXT | Base fee per gas of the block |
blob_gas_price | NUMBER | Blob gas price of the block |
successful_transactions | NUMBER | Number of successful transactions in the block |
failed_transactions | NUMBER | Number of failed transactions in the block |
excess_blob_gas | NUMBER | Excess blob gas of the block |
total_difficulty | NUMBER | Total difficulty of the chain up to this block |
extra_data | TEXT | Extra data included in the block header |
blob_hashes | ARRAY | Array of hashes of the blobs in the block |
total_withdrawals | NUMBER | Total number of withdrawals in the block |
total_blob_transactions | NUMBER | Total number of blob transactions up to this block |
parent_beacon_root | TEXT | Root of the parent beacon block |
total_blobs | NUMBER | Total number of blobs up to this block |
size | NUMBER | Size of the block in bytes |
Sample Queries
Average Gas Used Per Block Daily
Calculates the average gas used per block for each day, providing insight into daily network activity.
SELECT
date,
AVG(gas_used) AS avg_gas_used
FROM
polygon.blocks
GROUP BY
date
ORDER BY
date;
Top 10 Miners by Block Count
Identifies the top 10 miners who have produced the most blocks, showing the most active block producers on the network.
SELECT
miner,
COUNT(*) AS block_count
FROM
polygon.blocks
GROUP BY
miner
ORDER BY
block_count DESC
LIMIT
10;
Blocks with Higher Than Average Gas Limit
Retrieves information about blocks that have a gas limit above the overall average gas limit, which might indicate blocks with more complex transactions.
SELECT
time,
number,
gas_limit
FROM
polygon.blocks
WHERE
gas_limit > (
SELECT
AVG(gas_limit)
FROM
polygon.blocks
)
ORDER BY
gas_limit DESC
LIMIT
100;