> ## 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 labeled address on Solana, keyed on `chain_id` and `address`. An account is a wallet or a program, such as an exchange wallet or an Orca pool, and its row names the project that runs it, so a raw address in any Solana table resolves to a name.

`label_source` says how an 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](/docs/catalog/accounts/registry).

## Sample queries

<Warning>
  The table is clustered on `account_id`, and that key is the one filter that prunes a scan of it. A query filtered on `chain_id` or `project_id` instead reads every row, which stays inexpensive because the table is small, but keep the select list to the columns you need.
</Warning>

<Tabs>
  <Tab title="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
    ```
  </Tab>

  <Tab title="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
    ```
  </Tab>

  <Tab title="Look up one address">
    **Resolve one Solana address to the project that runs it.** `account_id` is the address and the chain joined by a hyphen, and Solana spells an address in case-sensitive base58, so paste it exactly as it appears.

    ```sql theme={null}
    select
        address,
        project_id,
        contract_name,
        account_type
    from `dimensions.accounts`
    where account_id = 'JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4-solana'
    ```
  </Tab>
</Tabs>
