solana_utils.daily_balances table provides end-of-day balance snapshots for every address on Solana, covering both native SOL and SPL token holdings. This table is the historical counterpart to solana_utils.latest_balances.
Each row represents the balance for a specific address, token, and day. The table is partitioned by month for query performance and is sourced from solana.account_activity.
When to Use This Table
- Track historical balance changes for a wallet over time
- Analyze token holder distribution trends
- Build time-series portfolio valuation charts
- Monitor treasury balances for Solana DAOs and protocols
Query Performance
Partition key:month
Always include a time filter (day range) and filter on address or token_mint_address for best performance.
Table Schema
| Column | Type | Description |
|---|---|---|
day | TIMESTAMP | Day of the balance snapshot |
month | DATE | Month partition key |
address | VARCHAR | Solana wallet address |
sol_balance | DOUBLE | Native SOL balance at end of day |
token_mint_address | VARCHAR | Mint address of the SPL token |
token_balance | DECIMAL(38,18) | SPL token balance in display units |
token_balance_owner | VARCHAR | Owner of the token balance |
block_time | TIMESTAMP | Block time of the last balance change |
block_slot | BIGINT | Block slot of the last balance change |
unique_address_key | VARCHAR | Unique key for address + token combination |
updated_at | TIMESTAMP | When this record was last updated |