Skip to main content
The solana_utils.latest_balances table provides the most recent balance snapshot for every address on Solana, covering both native SOL and SPL token holdings. Each row represents the latest known balance for a specific address and token combination. This table is derived from solana_utils.daily_balances and is incrementally updated.

When to Use This Table

  • Look up current token holdings for a wallet
  • Build portfolio dashboards showing real-time Solana balances
  • Identify top holders of a specific SPL token
  • Power wallet scoring and risk profiling systems

Query Performance

This table can be large. Always filter on address or token_mint_address for best performance.
-- ✅ Good: filter on specific address
SELECT *
FROM solana_utils.latest_balances
WHERE address = 'FG4Y3yX4AAchp1HvNZ7LfzFTewF2f6nDoMDCohTFrdpk'

-- ✅ Good: top holders of a specific token
SELECT address, token_balance
FROM solana_utils.latest_balances
WHERE token_mint_address = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' -- USDC
ORDER BY token_balance DESC
LIMIT 100

Table Schema

ColumnTypeDescription
addressVARCHARSolana wallet address
block_timeTIMESTAMPBlock time of the latest balance update
block_slotBIGINTBlock slot of the latest balance update
sol_balanceDOUBLENative SOL balance
token_balanceDECIMAL(38,18)SPL token balance in display units
token_mint_addressVARCHARMint address of the SPL token
token_balance_ownerVARCHAROwner of the token balance
updated_atTIMESTAMPWhen this record was last updated

Table Sample

Example Queries

Get all token balances for a specific wallet:
SELECT
  token_mint_address,
  token_balance,
  sol_balance,
  updated_at
FROM solana_utils.latest_balances
WHERE address = 'FG4Y3yX4AAchp1HvNZ7LfzFTewF2f6nDoMDCohTFrdpk'
ORDER BY token_balance DESC
Top SOL holders:
SELECT
  address,
  sol_balance
FROM solana_utils.latest_balances
WHERE sol_balance > 0
ORDER BY sol_balance DESC
LIMIT 50