Pinax Logo/Datasets
PolygonBalance Changes

Column Descriptions

for polygon.balance_changes

13 rows
NameTypeDescription
new_balance_hexTEXTNew balance of the address after the change (in hexadecimal)
old_balance_hexTEXTOld balance of the address before the change (in hexadecimal)
new_balanceNUMBERNew balance of the address after the change (in Wei)
block_numberNUMBERBlock number in which the balance change occurred
old_balanceNUMBEROld balance of the address before the change (in Wei)
reason_codeNUMBERNumeric code representing the reason for the balance change
ordinalNUMBEROrdinal of the balance change within the block
block_dateDATEDate of the block in which the balance change occurred
tx_hashTEXTHash of the transaction that caused the balance change
reasonTEXTReason for the balance change (e.g., 'Call', 'Create', 'Fee', etc.)
addressTEXTAddress whose balance changed
block_hashTEXTHash of the block in which the balance change occurred
block_timeTIMESTAMP_NTZTimestamp of the block in which the balance change occurred

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
  polygon.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
  polygon.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
  polygon.balance_changes
WHERE
  reason = 'Fee';