Query editor
with token_addresses as (select address as address, symbol, name, type, price, 'ethereum' as blockchainfrom dune.ondo_team.result_ondo_assetsunion allselect address_bnb as address, symbol, name, type, price, 'bnb' as blockchainfrom dune.ondo_team.result_ondo_assetsunion allselect address_hype as address, symbol, name, type, price, 'hyperevm' as blockchainfrom dune.ondo_team.result_ondo_assetswhere address_hype is not nullunion allselect address_robinhood as address, symbol, name, type, price, 'robinhood' as blockchainfrom dune.ondo_team.result_ondo_assetswhere address_robinhood is not null),chains as (SELECT addressFROM UNNEST(split('{{chains}}', ',')) AS t(address)),-- Uniswap pool addresses that hold GM tokensuniswap_pools AS (SELECT DISTINCTproject_contract_address AS address,'Uniswap' AS cex_name,blockchainFROM dex.tradesWHERE project = 'uniswap'AND block_month >= DATE '2025-01-01'AND blockchain IN (select address from chains)AND (token_bought_address IN (SELECT address FROM token_addresses)OR token_sold_address IN (SELECT address FROM token_addresses))),-- DISTINCT so an address listed twice can't fan out the joins belowcex as (select distinct address, cex_name, blockchain from (select address, cex_name, blockchainfrom cex.addressesunion allselect 0x73d8bd54f7cf5fab43fe4ef40a62d390644946db as address, 'Binance Alpha' as cex_name, 'bnb' as blockchainunion allselect address, cex_name, blockchainFROM (VALUES(0x67ccc64e3fc774e65192c2fb52b4b605c55547ef, 'Bitget onchain', 'ethereum'),(0xa3a961f860808fb971ac854570f74a11384b6410, 'Bitget onchain', 'ethereum'),(0x2409b99d8ae26be02f3ef1ca9b0c1d279eacd408, 'Bitget onchain', 'ethereum'),(0xd2e784daa6caada0cd2ad3d0f69d57609d61054c, 'Bitget onchain', 'ethereum'),(0x85e6fb3c048f78e417b3c49b31688afcc97217f7, 'Bitget onchain', 'ethereum'),(0xd3833b5944894a7dd2460f4c6384fd09e6eb35b4, 'Bitget onchain', 'ethereum'),(0x95f76ec1492083eeb65a9f9222ff0b4430455ace, 'Bitget onchain', 'ethereum'),(0x4adbd6399acbc5c059f8f8ae580448f431f63d01, 'Bitget onchain', 'ethereum'),(0x7733c074889aeb4ac26de3be8122f663fdc8947f, 'Bitget onchain', 'ethereum'),(0xa3c09654498652ee1006548259abaa7fd85037ab, 'Bitget onchain', 'ethereum'),(0xa3328ebbb14b95ce760effd11d1914b905d97ac2, 'Bitget onchain', 'ethereum'),(0x027c368a8e6720f501d99f78d2630e56ca0a6878, 'Bitget onchain', 'ethereum'),(0xd652f4a38575997029142a31d61728e3cc5813fe, 'Bitget onchain', 'ethereum'),