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

> ## Agent Instructions
> To query the Token Terminal data catalog, read https://tokenterminal.com/docs/catalog/agents-manual.md first. It is the whole catalog as one page: table naming grammar, key columns, partition and cluster rules, units, additivity, and the tables that are documented but not served yet.
> Never query a catalog table on a time bound alone. Also filter its cluster key, which you read from INFORMATION_SCHEMA.COLUMNS; an empty result means the object is a view, whose pruning contract is on its page. Compute is billed to the caller's own Google Cloud project.

# Accounts

> Wallets and programs labeled with the projects that own them.

`dimensions.accounts` holds one row per address on Solana that is labeled or that a `facts_accounts` table holds a row for, keyed on `chain_id` and `address`. An account is a wallet or a program, such as an exchange wallet or an Orca pool, and where it is labeled its row names the project that runs it, so a labeled address in any Solana table resolves to the project behind it. An address nobody has labeled has a null `label_source` and null label columns beside its region and funding.

`label_source` says how a labeled address reached the table. The Solana rows are `curated`, an attribution a person authored; `factory_derived` marks an address a known factory emitted and names that factory in `parent_address`.

Every column is documented at [Accounts](https://tokenterminal.com/docs/catalog/accounts/registry.md).

## Sample queries

> [!WARNING]
>
> The table is clustered on `chain_id` then `address`. Filter on `chain_id` to read one chain, and add `address` for a single account; a query filtered only on `project_id` or `label_source` reads every row of a table that spans every account the facts hold, so keep the select list to the columns you need.

**Labeled projects**

**Rank the projects with the most labeled addresses on Solana.** Joining `dimensions.projects` on `project_id` adds each project's name and its market sector.

```sql theme={null}
select
    projects.name,
    projects.primary_market_sector,
    count(*) as addresses
from `dimensions.accounts` as accounts
join `dimensions.projects` as projects
    using (project_id)
where accounts.chain_id = 'solana'
  and accounts.label_source = 'curated'
group by projects.name, projects.primary_market_sector
order by addresses desc
limit 50
```

**What one project runs**

**List the addresses one project runs on Solana.** `contract_name` is the label the attributing project gives an address, and `account_type` reads `smartcontract` for a program.

```sql theme={null}
select
    address,
    contract_name,
    account_type
from `dimensions.accounts`
where chain_id = 'solana'
  and project_id = 'jupiter'
  and label_source = 'curated'
order by contract_name
limit 100
```

**Look up one address**

**Resolve one Solana address to the project that runs it.** Filter on `chain_id` and `address`, and paste the address exactly as it appears: Solana spells it in case-sensitive base58.

```sql theme={null}
select
    address,
    project_id,
    contract_name,
    account_type
from `dimensions.accounts`
where chain_id = 'solana'
    and address = 'JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4'
```


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