> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dune.com/llms.txt
> Use this file to discover all available pages before exploring further.

# solana_utils.latest_balances

> Current SOL and SPL token balances for every address on Solana.

export const TableSample = ({tableName, tableSchema}) => <>
    <div className="hidden dark:block">
      <iframe src={`https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=${tableSchema}&table_name_t6f0df=${tableName}&darkMode=true`} style={{
  width: '100%',
  height: '500px',
  border: 'none',
  marginTop: '10px'
}} />
    </div>
    <div className="dark:hidden">
      <iframe src={`https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=${tableSchema}&table_name_t6f0df=${tableName}`} style={{
  width: '100%',
  height: '500px',
  border: 'none',
  marginTop: '10px'
}} />
    </div>
  </>;

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.

```sql theme={null}
-- ✅ 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

Examples are illustrative values for a Solana SPL token account holding USDC. They are not a live balance snapshot.

| Column | Type | Description | Example |
| - | - | - | - |
| `address` | `VARCHAR` | Solana wallet address | `FG4Y3yX4AAchp1HvNZ7LfzFTewF2f6nDoMDCohTFrdpk` |
| `block_time` | `TIMESTAMP` | Block time of the latest balance update | `2025-01-15 12:00:00` |
| `block_slot` | `BIGINT` | Block slot of the latest balance update | `313000000` |
| `sol_balance` | `DOUBLE` | Native SOL balance | `0.00203928` |
| `token_balance` | `DECIMAL(38,18)` | SPL token balance in display units | `1000.000000000000000000` |
| `token_mint_address` | `VARCHAR` | Mint address of the SPL token | `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v` |
| `token_balance_owner` | `VARCHAR` | Owner of the token balance | `HaeE7fyaDjG8fRbSuw5RkKLLgTirQE2Mhosuy7pmFxKh` |
| `updated_at` | `TIMESTAMP` | When this record was last updated | `2025-01-15 13:00:00` |

## Table Sample

<TableSample tableSchema="solana_utils" tableName="latest_balances" />

## Example Queries

**Get all token balances for a specific wallet:**

```sql theme={null}
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:**

```sql theme={null}
SELECT
  address,
  sol_balance
FROM solana_utils.latest_balances
WHERE sol_balance > 0
ORDER BY sol_balance DESC
LIMIT 50
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.