> ## 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.

# Registry

> Real-world asset identity and the reference assets the tokens stand for.

The identity tables behind every real-world asset figure. Every metric joins to one of them, and [Coverage](https://tokenterminal.com/docs/catalog/real-world-assets.md) introduces each grain.

## Tables

**Assets**

One row per real-world asset: `dimensions.assets` filtered on the three `tokenized-*` `asset_type` values: stocks, funds and commodities.

<table>
  <thead>
    <tr>
      <th width="280">Column</th>
      <th width="130">Type</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>`asset_id`</td>
      <td>`STRING`</td>
      <td>Identifier of the asset, for example `usdc`.</td>
    </tr>

    <tr>
      <td>`reference_asset_id`</td>
      <td>`STRING`</td>
      <td>What the asset tracks or wraps. Joins `dimensions.reference_assets`.</td>
    </tr>

    <tr>
      <td>`name`</td>
      <td>`STRING`</td>
      <td>Display name of the asset.</td>
    </tr>

    <tr>
      <td>`symbol`</td>
      <td>`STRING`</td>
      <td>Ticker symbol of the asset.</td>
    </tr>

    <tr>
      <td>`asset_type`</td>
      <td>`STRING`</td>
      <td>What kind of instrument it is: `stablecoin`, `tokenized-stocks`, `tokenized-funds`, `lending-token`, `tokenized-commodities`, `liquid-staking-token`, `tokenized-cryptoasset` or `wrapped_native`.</td>
    </tr>

    <tr>
      <td>`description`</td>
      <td>`STRING`</td>
      <td>Short description of the asset.</td>
    </tr>

    <tr>
      <td>`custom_price_fx_peg`</td>
      <td>`STRUCT`</td>
      <td>A fixed rate the asset is priced at rather than a market quote, in `currency`, `multiplier` and `priority`. Set only where the asset declares one, and `priority` says whether the rate overrides the market price or only fills in where there is none.</td>
    </tr>

    <tr>
      <td>`created_at`</td>
      <td>`TIMESTAMP`</td>
      <td>When the asset entered the registry.</td>
    </tr>

    <tr>
      <td>`metrics_verified_at`</td>
      <td>`TIMESTAMP`</td>
      <td>When the asset's published metrics were last verified. Null while unverified.</td>
    </tr>

    <tr>
      <td>`mica_marker`</td>
      <td>`STRING`</td>
      <td>Which MiCA category the peg implies: `emt_by_peg` for single-currency stablecoins, `art_by_peg` for other stablecoins, `other_crypto_asset` or `out_of_scope_financial_instrument` for everything else. A marker, not a regulatory ruling.</td>
    </tr>

    <tr>
      <td>`mica_authorization_status`</td>
      <td>`STRING`</td>
      <td>Whether the token is authorized under MiCA according to the official register: `emt_authorized`, `art_authorized`, `not_authorized`, `application_withdrawn`, `out_of_scope_mifid`, `other_crypto_asset` or `not_checked`. A sourced regulatory fact, unlike `mica_marker`, which is read off the peg.</td>
    </tr>

    <tr>
      <td>`regulatory_supervised`</td>
      <td>`STRING`</td>
      <td>What the issuer discloses about its own supervision: `true`, `false` or `unknown`. A disclosure, never an inference.</td>
    </tr>

    <tr>
      <td>`regulator`</td>
      <td>`STRING`</td>
      <td>The authority the issuer names as its supervisor, such as `NYDFS/FinCEN`. Empty where the issuer names none.</td>
    </tr>

    <tr>
      <td>`reserves_source`</td>
      <td>`STRING`</td>
      <td>Where the reserve figure comes from: `attestation` for an issuer-published report, `onchain` where the backing addresses are identified and the balance computed here, `none` where the issuer publishes nothing.</td>
    </tr>

    <tr>
      <td>`reserves_attestor`</td>
      <td>`STRING`</td>
      <td>The firm signing the attestation, filled in where `reserves_source` is `attestation`.</td>
    </tr>

    <tr>
      <td>`return_treatment`</td>
      <td>`STRING`</td>
      <td>How the token treats the income the underlying pays: `total_return`, `price_return`, `price_return_with_distribution` or `not_applicable`. Keyed on the token rather than on what it tracks, so two tokenizations of one share can differ.</td>
    </tr>

    <tr>
      <td>`issuer_legal_name`</td>
      <td>`STRING`</td>
      <td>The issuing entity as a government register spells it, which is routinely not the brand.</td>
    </tr>

    <tr>
      <td>`issuer_domicile`</td>
      <td>`STRING`</td>
      <td>ISO 3166-1 alpha-2 country code of where the issuing entity is registered, such as `US`. Resolved from the issuing project, so it is null when that project has no domicile on file.</td>
    </tr>

    <tr>
      <td>`issuer_lei`</td>
      <td>`STRING`</td>
      <td>Legal Entity Identifier of the issuing entity.</td>
    </tr>

    <tr>
      <td>`issuer_cik`</td>
      <td>`STRING`</td>
      <td>SEC Central Index Key of the issuing entity.</td>
    </tr>

    <tr>
      <td>`issuer_regulatory_framework`</td>
      <td>`ARRAY<STRING>`</td>
      <td>Regimes the issuing entity operates under. An array because an entity can sit under several at once.</td>
    </tr>

    <tr>
      <td>`issuer_legal_source_url`</td>
      <td>`STRING`</td>
      <td>The filing or register the legal fields above were read from, with `issuer_legal_retrieved_at` recording when.</td>
    </tr>

    <tr>
      <td>`issuer_legal_retrieved_at`</td>
      <td>`STRING`</td>
      <td>When `issuer_legal_source_url` was last read.</td>
    </tr>

    <tr>
      <td>`use_of_income`</td>
      <td>`STRING`</td>
      <td>What the issuer says it does with the income the underlying pays, in its own words. `return_treatment` is the coded answer to the same question.</td>
    </tr>

    <tr>
      <td>`isin`</td>
      <td>`STRING`</td>
      <td>International Securities Identification Number of the instrument, where it has one.</td>
    </tr>

    <tr>
      <td>`cusip`</td>
      <td>`STRING`</td>
      <td>CUSIP of the instrument, where it has one.</td>
    </tr>

    <tr>
      <td>`peg_currency`</td>
      <td>`STRING`</td>
      <td>ISO currency code of the peg, set when the asset tracks a national currency. Empty otherwise: a fund strategy, a share or a commodity is not a peg.</td>
    </tr>

    <tr>
      <td>`project_relations`</td>
      <td>`ARRAY<STRUCT>`</td>
      <td>Every project linked to the asset, one element per `(project_id, relation)`. `relation` is `issuer`, `asset_manager`, `risk_curator` or `manager`. Most assets link to one project; a few link to several, such as an issuer alongside a separate manager.</td>
    </tr>

    <tr>
      <td>`issuer_project_id`</td>
      <td>`STRING`</td>
      <td>The project whose relation is `issuer`, when exactly one project holds that relation. Empty when none do, and empty when more than one does; read `project_relations` for the full set.</td>
    </tr>

    <tr>
      <td>`coingecko_id`</td>
      <td>`STRING`</td>
      <td>Identifier of the same asset in the CoinGecko catalogue, for joining our record to a public one.</td>
    </tr>

    <tr>
      <td>`coinmarketcap_id`</td>
      <td>`STRING`</td>
      <td>Identifier of the same asset in the CoinMarketCap catalogue, for the same purpose.</td>
    </tr>

    <tr>
      <td>`yahoo_ticker`</td>
      <td>`STRING`</td>
      <td>Ticker the underlying trades under on Yahoo Finance, where it is listed.</td>
    </tr>
  </tbody>
</table>

**Asset tokens**

One row per chain an asset is issued on, in `dimensions.asset_tokens`. `bridged_status` says whether the supply was minted there or bridged in.

<table>
  <thead>
    <tr>
      <th width="280">Column</th>
      <th width="130">Type</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>`asset_token_id`</td>
      <td>`STRING`</td>
      <td>Identifier of the deployment, formatted `{asset_id}-{token_address}-{chain_id}`.</td>
    </tr>

    <tr>
      <td>`asset_id`</td>
      <td>`STRING`</td>
      <td>Asset the deployment belongs to. Joins `dimensions.assets`.</td>
    </tr>

    <tr>
      <td>`token_id`</td>
      <td>`STRING`</td>
      <td>Key of the deployment in `dimensions.tokens`, formatted `{token_address}-{chain_id}`.</td>
    </tr>

    <tr>
      <td>`chain_id`</td>
      <td>`STRING`</td>
      <td>Chain the contract is deployed on.</td>
    </tr>

    <tr>
      <td>`token_address`</td>
      <td>`STRING`</td>
      <td>Address of the token contract.</td>
    </tr>

    <tr>
      <td>`is_bridged`</td>
      <td>`BOOL`</td>
      <td>Raw registry flag: bridged in rather than issued natively. Always present, so `false` means native or unstated. Filter on `bridged_status` instead.</td>
    </tr>

    <tr>
      <td>`bridged_status`</td>
      <td>`STRING`</td>
      <td>The classification supply measures split on: `native`, `bridged` or `unclassified`.</td>
    </tr>

    <tr>
      <td>`token_standard`</td>
      <td>`STRING`</td>
      <td>Token standard of the contract, such as `erc20`, `erc3643` or `spl`. Null where not yet read.</td>
    </tr>

    <tr>
      <td>`token_extensions`</td>
      <td>`ARRAY<STRING>`</td>
      <td>Traits riding on top of `token_standard`, such as `fiat_token_blacklist` or `transfer_hook`. Empty, not null, when none are detected.</td>
    </tr>

    <tr>
      <td>`token_extensions_coverage`</td>
      <td>`STRING`</td>
      <td>Whether an extension detector ran for this deployment: `probed`, so an empty `token_extensions` means none were found; `not_probed`, a detector exists but could not reach the chain; or `no_detector`, none exists for the standard. In the last two the extensions are unknown rather than absent.</td>
    </tr>

    <tr>
      <td>`token_permissions`</td>
      <td>`ARRAY<STRING>`</td>
      <td>Normalized capability ids the standard or its extensions imply, such as `freeze_addresses` or `seize_funds`. Can hold several. Empty, not null, when none apply. The label and definition of each id, and of every other column here, are rows of `dimensions.asset_token_fields`.</td>
    </tr>

    <tr>
      <td>`decimals`</td>
      <td>`INT64`</td>
      <td>Token precision. Null where not yet read.</td>
    </tr>

    <tr>
      <td>`first_issued_onchain`</td>
      <td>`DATE`</td>
      <td>Date of the first mint of this deployment. Null where not yet read.</td>
    </tr>
  </tbody>
</table>

**Reference assets**

One row per thing a real-world asset stands for, in `dimensions.reference_assets`, classified in `type`. Some references are broad categories, such as `etf` and `fund_strategy`, and an asset pointing at one stands for the category while its own name says which instrument it wraps.

<table>
  <thead>
    <tr>
      <th width="280">Column</th>
      <th width="130">Type</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>`reference_asset_id`</td>
      <td>`STRING`</td>
      <td>Identifier of the thing being tracked.</td>
    </tr>

    <tr>
      <td>`linked_asset_id`</td>
      <td>`STRING`</td>
      <td>Its own tokenized asset in `dimensions.assets`, where one exists.</td>
    </tr>

    <tr>
      <td>`name`</td>
      <td>`STRING`</td>
      <td>Display name.</td>
    </tr>

    <tr>
      <td>`symbol`</td>
      <td>`STRING`</td>
      <td>Ticker symbol.</td>
    </tr>

    <tr>
      <td>`type`</td>
      <td>`STRING`</td>
      <td>What kind of thing it is: `stock`, `crypto`, `fiat`, `pendle_pt`, `etf`, `commodity`, `fund_strategy`, `bond` or `other`.</td>
    </tr>

    <tr>
      <td>`currency_code`</td>
      <td>`STRING`</td>
      <td>ISO currency code, filled in only on the `fiat` rows.</td>
    </tr>

    <tr>
      <td>`unit`</td>
      <td>`STRING`</td>
      <td>The physical unit a commodity is quoted in, for example `troy ounce` or `barrel`. Empty on everything else.</td>
    </tr>

    <tr>
      <td>`aliases`</td>
      <td>`ARRAY<STRING>`</td>
      <td>Other names it is known by.</td>
    </tr>

    <tr>
      <td>`yahoo_ticker`</td>
      <td>`STRING`</td>
      <td>Ticker the reference trades under on Yahoo Finance, where it is listed.</td>
    </tr>
  </tbody>
</table>

**Disclosure fields**

One row per disclosure field of `dimensions.asset_disclosures`: the section heading, label and definition shown next to each disclosed term, and the definition of each closed-set value, in display order.

<table>
  <thead>
    <tr>
      <th width="280">Column</th>
      <th width="130">Type</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>`field_id`</td>
      <td>`STRING`</td>
      <td>The column of `dimensions.asset_disclosures` this row describes, such as `claim_type`.</td>
    </tr>

    <tr>
      <td>`section_id`</td>
      <td>`STRING`</td>
      <td>Key of the section the field sits in: `identity`, `legal`, `providers`, `primary_market`, `identifiers` or `underlying`.</td>
    </tr>

    <tr>
      <td>`section_title`</td>
      <td>`STRING`</td>
      <td>Heading shown above the section, such as `Legal and regulatory`.</td>
    </tr>

    <tr>
      <td>`section_order`</td>
      <td>`INT64`</td>
      <td>Position of the section, from 1.</td>
    </tr>

    <tr>
      <td>`field_order`</td>
      <td>`INT64`</td>
      <td>Position of the field within its section, from 1.</td>
    </tr>

    <tr>
      <td>`title`</td>
      <td>`STRING`</td>
      <td>Label of the field, such as `Claim type`.</td>
    </tr>

    <tr>
      <td>`definition`</td>
      <td>`STRING`</td>
      <td>One-sentence definition shown with the label.</td>
    </tr>

    <tr>
      <td>`values`</td>
      <td>`ARRAY<STRUCT>`</td>
      <td>One element per value a closed-set field can hold: `value` as stored in the column, `title`, its short display name, and `definition`, the sentence that explains it. Empty for a free-text field.</td>
    </tr>

    <tr>
      <td>`inserted_at`</td>
      <td>`TIMESTAMP`</td>
      <td>When the registry snapshot behind the row was published.</td>
    </tr>
  </tbody>
</table>

**Underlying securities**

One row per security a tokenized asset references, keyed by ISIN, with the values looked up for it in public registers (OpenFIGI, GLEIF, SEC EDGAR). An asset links to its row through `underlying_security_id` and `underlying_isin` on `dimensions.asset_disclosures`.

<table>
  <thead>
    <tr>
      <th width="280">Column</th>
      <th width="130">Type</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>`security_id`</td>
      <td>`STRING`</td>
      <td>Identifier of the security, formatted `{ticker}-{isin}` or `{class}-{isin}`, such as `1-kyg217651051`. Joins `dimensions.asset_disclosures.underlying_security_id`.</td>
    </tr>

    <tr>
      <td>`security_class`</td>
      <td>`STRING`</td>
      <td>`equity` or `etf`.</td>
    </tr>

    <tr>
      <td>`looked_up_at`</td>
      <td>`TIMESTAMP`</td>
      <td>When the register values were fetched. Null before the first lookup.</td>
    </tr>

    <tr>
      <td>`inserted_at`</td>
      <td>`TIMESTAMP`</td>
      <td>When the registry snapshot behind the row was published.</td>
    </tr>

    <tr>
      <td>`isin`</td>
      <td>`STRING`</td>
      <td>ISIN of the security. Joins `dimensions.asset_disclosures.underlying_isin`.</td>
    </tr>

    <tr>
      <td>`name`</td>
      <td>`STRING`</td>
      <td>Security name as OpenFIGI records it for this ISIN, such as `BERKSHIRE HATHAWAY INC-CL B`.</td>
    </tr>

    <tr>
      <td>`ticker`</td>
      <td>`STRING`</td>
      <td>Ticker of the US composite listing as OpenFIGI records it, such as `BRK/B`.</td>
    </tr>

    <tr>
      <td>`security_type`</td>
      <td>`STRING`</td>
      <td>OpenFIGI security type, such as `Common Stock` or `ETP`.</td>
    </tr>

    <tr>
      <td>`figi`</td>
      <td>`STRING`</td>
      <td>Share-class FIGI from OpenFIGI, the one FIGI that is the same in every country.</td>
    </tr>

    <tr>
      <td>`cusip`</td>
      <td>`STRING`</td>
      <td>CUSIP embedded in a US or Canadian ISIN, kept when OpenFIGI maps it back to the same share class.</td>
    </tr>

    <tr>
      <td>`issuer_name`</td>
      <td>`STRING`</td>
      <td>Legal name of the issuer on its GLEIF LEI record.</td>
    </tr>

    <tr>
      <td>`issuer_lei`</td>
      <td>`STRING`</td>
      <td>LEI of the issuer from GLEIF. For a fund that is one series of a multi-fund trust, the trust's LEI.</td>
    </tr>

    <tr>
      <td>`issuer_cik`</td>
      <td>`STRING`</td>
      <td>SEC Central Index Key of the issuer. SEC registrants only.</td>
    </tr>

    <tr>
      <td>`issuer_jurisdiction`</td>
      <td>`STRING`</td>
      <td>Where the issuer is incorporated, as the ISO 3166 code on its GLEIF LEI record, such as `US-DE`.</td>
    </tr>

    <tr>
      <td>`exchange`</td>
      <td>`STRING`</td>
      <td>Exchange the SEC lists for the issuer's ticker, such as `NYSE`. SEC registrants only.</td>
    </tr>

    <tr>
      <td>`sic`</td>
      <td>`STRING`</td>
      <td>Standard Industrial Classification code the SEC assigns to the issuer. SEC registrants only.</td>
    </tr>

    <tr>
      <td>`industry`</td>
      <td>`STRING`</td>
      <td>The SEC's description of the issuer's SIC code, such as `Fire, Marine & Casualty Insurance`.</td>
    </tr>

    <tr>
      <td>`sector`</td>
      <td>`STRING`</td>
      <td>Sector mapped from the SIC code for equities, such as `financials`. Null where the code names no single sector, and for funds.</td>
    </tr>

    <tr>
      <td>`sec_filings`</td>
      <td>`STRING`</td>
      <td>EDGAR page listing the issuer's SEC filings. SEC registrants only.</td>
    </tr>
  </tbody>
</table>

**Underlying security fields**

One row per column of `dimensions.underlying_securities`, in `dimensions.underlying_security_fields`: the section heading, label and definition shown next to each value, in display order.

<table>
  <thead>
    <tr>
      <th width="280">Column</th>
      <th width="130">Type</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>`field_id`</td>
      <td>`STRING`</td>
      <td>The column of `dimensions.underlying_securities` this row describes, such as `issuer_lei`.</td>
    </tr>

    <tr>
      <td>`section_id`</td>
      <td>`STRING`</td>
      <td>Key of the section the field sits in: `security`, `issuer` or `classification`.</td>
    </tr>

    <tr>
      <td>`section_title`</td>
      <td>`STRING`</td>
      <td>Heading shown above the section, such as `Classification`.</td>
    </tr>

    <tr>
      <td>`section_order`</td>
      <td>`INT64`</td>
      <td>Position of the section, from 1.</td>
    </tr>

    <tr>
      <td>`field_order`</td>
      <td>`INT64`</td>
      <td>Position of the field within its section, from 1.</td>
    </tr>

    <tr>
      <td>`title`</td>
      <td>`STRING`</td>
      <td>Label of the field, such as `Issuer LEI`.</td>
    </tr>

    <tr>
      <td>`definition`</td>
      <td>`STRING`</td>
      <td>One-sentence definition shown with the label.</td>
    </tr>

    <tr>
      <td>`values`</td>
      <td>`ARRAY<STRUCT>`</td>
      <td>One element per value a closed-set field can hold: `value` as stored in the column, `title`, its short display name, and `definition`, the sentence that explains it. Empty for a free-text field.</td>
    </tr>

    <tr>
      <td>`inserted_at`</td>
      <td>`TIMESTAMP`</td>
      <td>When the registry snapshot behind the row was published.</td>
    </tr>
  </tbody>
</table>

**Asset token fields**

One row per column of `dimensions.asset_tokens`: the section heading, label and definition shown next to each deployment field, and the title and definition of each closed-set value: every token standard, extension and issuer permission, and the issuance and detection statuses, in display order.

<table>
  <thead>
    <tr>
      <th width="280">Column</th>
      <th width="130">Type</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>`field_id`</td>
      <td>`STRING`</td>
      <td>The column of `dimensions.asset_tokens` this row describes, such as `token_standard`.</td>
    </tr>

    <tr>
      <td>`section_id`</td>
      <td>`STRING`</td>
      <td>Key of the section the field sits in: `identity`, `standard`, `permissions` or `facts`.</td>
    </tr>

    <tr>
      <td>`section_title`</td>
      <td>`STRING`</td>
      <td>Heading shown above the section, such as `Issuer permissions`.</td>
    </tr>

    <tr>
      <td>`section_order`</td>
      <td>`INT64`</td>
      <td>Position of the section, from 1.</td>
    </tr>

    <tr>
      <td>`field_order`</td>
      <td>`INT64`</td>
      <td>Position of the field within its section, from 1.</td>
    </tr>

    <tr>
      <td>`title`</td>
      <td>`STRING`</td>
      <td>Label of the field, such as `Standard`.</td>
    </tr>

    <tr>
      <td>`definition`</td>
      <td>`STRING`</td>
      <td>One-sentence definition shown with the label.</td>
    </tr>

    <tr>
      <td>`values`</td>
      <td>`ARRAY<STRUCT>`</td>
      <td>One element per value a closed-set field can hold: `value` as stored in the column, `title`, its short display name, and `definition`, the sentence that explains it. For `token_standard`, `token_extensions` and `token_permissions` this is the full vocabulary. Empty for a free-text field.</td>
    </tr>

    <tr>
      <td>`inserted_at`</td>
      <td>`TIMESTAMP`</td>
      <td>When the registry snapshot behind the row was published.</td>
    </tr>
  </tbody>
</table>

## Sample queries

**Assets by type**

`asset_type` separates tokenized stocks, funds and commodities from other instruments. `reference_assets.type` classifies the reference: a lending receipt keeps `asset_type = 'lending-token'` even when it references a stock.

```sql theme={null}
select
    asset_type,
    count(*) as assets
from `dimensions.assets`
where asset_type in (
    'tokenized-stocks', 'tokenized-funds',
    'tokenized-commodities'
)
group by asset_type
order by assets desc
```

**One reference asset's tokens**

`reference_asset_id` is the join between a wrapper and the thing it tracks, and several issuers can point at the same one. Each token's name says who issued it.

```sql theme={null}
select
    assets.asset_id,
    assets.name,
    assets.symbol
from `dimensions.assets` as assets
join `dimensions.reference_assets` as reference_assets
    using (reference_asset_id)
where reference_assets.reference_asset_id = 'nvda'
  and assets.asset_type = 'tokenized-stocks'
order by assets.asset_id
```

**Most-tokenized reference assets**

A `having` clause on the token count keeps the result to references more than one issuer has wrapped. `type` says what kind of thing the reference is, from an equity to a fund strategy.

```sql theme={null}
select
    reference_assets.reference_asset_id,
    reference_assets.name,
    reference_assets.type,
    count(*) as instruments
from `dimensions.assets` as assets
join `dimensions.reference_assets` as reference_assets
    using (reference_asset_id)
where assets.asset_type in (
    'tokenized-stocks', 'tokenized-funds',
    'tokenized-commodities'
)
group by 1, 2, 3
having count(*) > 1
order by instruments desc
```

**Reference assets by issuer**

`issuer_project_id` is the project holding the `issuer` relation, so `count(distinct ...)` on it counts issuers where `count(*)` counts tokens. Where a reference asset has more tokens than issuers, one issuer runs two wrappers on the same share.

```sql theme={null}
select
    reference_assets.symbol as reference_asset,
    reference_assets.type,
    count(distinct assets.issuer_project_id) as issuers,
    count(*) as tokens,
    string_agg(distinct assets.issuer_project_id order by assets.issuer_project_id) as issuer_list
from `dimensions.assets` as assets
join `dimensions.reference_assets` as reference_assets
    using (reference_asset_id)
where assets.asset_type = 'tokenized-stocks'
group by reference_asset, reference_assets.type
order by issuers desc
limit 20
```

**Return treatment of one share**

`return_treatment` says what the token does with the income the underlying pays. It is keyed on the token, so the same share tokenized by two issuers reads `total_return` on one row and `price_return_with_distribution` on the next.

```sql theme={null}
select
    assets.symbol as wrapper,
    projects.name as issuer,
    assets.return_treatment,
    assets.issuer_domicile
from `dimensions.assets` as assets
join `dimensions.reference_assets` as reference_assets
    using (reference_asset_id)
left join `dimensions.projects` as projects
    on projects.project_id = assets.issuer_project_id
where reference_assets.symbol = 'NVDA'
  and assets.asset_type = 'tokenized-stocks'
order by assets.return_treatment, issuer
```

**Return treatment across an issuer**

Reading `treatments` as one on every row makes the treatment a property of the issuer, held constant across every share it wraps. `string_agg` names which one the issuer settled on.

```sql theme={null}
select
    projects.name as issuer,
    count(*) as tokens,
    count(distinct assets.return_treatment) as treatments,
    string_agg(distinct assets.return_treatment order by assets.return_treatment) as treatment
from `dimensions.assets` as assets
join `dimensions.projects` as projects
    on projects.project_id = assets.issuer_project_id
where assets.asset_type = 'tokenized-stocks'
  and assets.return_treatment is not null
group by issuer
order by tokens desc
```


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