EthereumBalance Changes
Column Descriptions
for eth.balance_changes
13 rows
Name | Type | Description |
---|---|---|
block_number | NUMBER | |
reason_code | NUMBER | |
new_balance | NUMBER | |
tx_hash | TEXT | |
block_date | DATE | |
old_balance | NUMBER | |
reason | TEXT | |
new_balance_hex | TEXT | |
block_hash | TEXT | |
address | TEXT | |
block_time | TIMESTAMP_NTZ | |
ordinal | NUMBER | |
old_balance_hex | TEXT |
Sample Queries
Calculate Daily ETH Balance Change for an Address
Calculates the net change in ETH balance for a specific address per day. The result is returned in Ether instead of Wei.
SELECT
block_date,
SUM(new_balance - old_balance) / 1e18 AS daily_balance_change_ether
FROM
eth.balance_changes
WHERE
address = '0x742d35Cc6634C0532925a3b844Bc454e4438f44e'
GROUP BY
block_date
ORDER BY
block_date;
Find Largest Balance Increases
Identifies the top 10 largest balance increases for any address, showing the old and new balances, and the reason. The result is returned in Ether instead of Wei.
SELECT
address,
(old_balance / 1e18) as old_balance_ether,
(new_balance / 1e18) as new_balance_ether,
reason
FROM
eth.balance_changes
ORDER BY
(new_balance - old_balance) DESC
LIMIT
10;
Transaction Hashes with Fee Balance Changes
Retrieves the transaction hashes associated with balance changes where the reason is 'Fee'.
SELECT DISTINCT
tx_hash
FROM
eth.balance_changes
WHERE
reason = 'Fee';