PolygonTransactions
Column Descriptions
for polygon.transactions
35 rows
Name | Type | Description |
---|---|---|
blob_gas_price | NUMBER | Blob gas price for the transaction |
block_hash | TEXT | Hash of the block in which the transaction was included |
status_code | NUMBER | Numeric code representing the status of the transaction |
blob_hashes | ARRAY | Array of hashes of the blobs in the transaction |
blob_gas_used | NUMBER | Blob gas used by the transaction |
blob_gas_fee_cap | NUMBER | Blob gas fee cap for the transaction |
s | TEXT | S component of the transaction signature |
block_time | TIMESTAMP_NTZ | Timestamp of the block in which the transaction was included |
block_date | DATE | Date of the block in which the transaction was included |
v | TEXT | V component of the transaction signature |
receipts_root | TEXT | Merkle root of the transaction receipts in the block |
to | TEXT | Address of the recipient of the transaction |
max_priority_fee_per_gas | NUMBER | Maximum priority fee per gas specified in the transaction (for EIP-1559 transactions) |
data | TEXT | Data field of the transaction |
logs_bloom | TEXT | Bloom filter for the logs in the transaction |
value | NUMBER | Value transferred in the transaction (in Wei) |
block_number | NUMBER | Block number in which the transaction was included |
nonce | NUMBER | Nonce of the transaction |
r | TEXT | R component of the transaction signature |
gas_price | NUMBER | Gas price of the transaction (in Wei) |
type | TEXT | Type of the transaction (e.g., 'Legacy', 'EIP-1559', etc.) |
index | NUMBER | Index of the transaction within the block |
success | BOOLEAN | Boolean indicating whether the transaction was successful |
hash | TEXT | Hash of the transaction |
max_fee_per_gas | NUMBER | Maximum fee per gas specified in the transaction (for EIP-1559 transactions) |
begin_ordinal | NUMBER | Starting ordinal of the transaction within the block |
from | TEXT | Address of the sender of the transaction |
gas_limit | NUMBER | Gas limit of the transaction |
status | TEXT | Status of the transaction (e.g., 'Success', 'Failure') |
end_ordinal | NUMBER | Ending ordinal of the transaction within the block |
transactions_root | TEXT | Merkle root of the transactions in the block |
gas_used | NUMBER | Gas used by the transaction |
type_code | NUMBER | Numeric code representing the type of the transaction |
state_root | TEXT | Merkle root of the state trie after the transaction was processed |
cumulative_gas_used | NUMBER | Cumulative gas used by all transactions up to this one in the block |
Sample Queries
Active Users
Active users on 2024-10-01
SELECT
date_trunc ('minute', block_time) AS minute,
count(distinct "from") AS user
FROM
polygon.transactions
WHERE
block_date = '2024-10-01'
GROUP BY
minute
ORDER BY
minute ASC;
Top Contracts
Top 10 contracts by transactions on 2024-10-01
SELECT
"to" AS contract,
count(*) AS transactions
FROM
polygon.transactions
WHERE
block_date = '2024-10-01'
GROUP BY
contract
ORDER BY
transactions DESC
LIMIT
10;
Average Gas Used by Transaction Type
Calculates the average gas used for each transaction type, helping analyze resource consumption by different transaction types
SELECT
type,
AVG(gas_used) AS avg_gas_used
FROM
polygon.transactions
GROUP BY
type
ORDER BY
avg_gas_used DESC;