Query editor
-- ------------------------------------------------------------------------------- 3. Total holders by token (per Emerge token on Base)-- -----------------------------------------------------------------------------WITH emerge_tokens AS (SELECTtokenAddress AS token_address,tokenName AS token_name,tokenSymbol AS token_symbol,evt_block_time AS launch_dateFROM clanker_v4_multichain.clanker_evt_tokencreatedWHERE chain = 'base'AND json_extract_scalar(tokenContext, '$.interface') = 'Emerge'),transfers_with_balance AS (SELECTt.contract_address,t."from" AS address,-t.amount AS amountFROM tokens.transfers tINNER JOIN emerge_tokens e ON t.contract_address = e.token_addressWHERE t.blockchain = 'base'UNION ALLSELECTt.contract_address,t."to" AS address,t.amount AS amountFROM tokens.transfers tINNER JOIN emerge_tokens e ON t.contract_address = e.token_addressWHERE t.blockchain = 'base'),balances_per_token AS (SELECTcontract_address,address,SUM(amount) AS balanceFROM transfers_with_balanceGROUP BY 1, 2HAVING SUM(amount) > 0)SELECTe.token_address,e.token_name,e.token_symbol,e.launch_date,COUNT(DISTINCT b.address) AS holder_countFROM emerge_tokens eLEFT JOIN balances_per_token b ON e.token_address = b.contract_address--WHERE e.launch_date >= CAST('2026-03-01' as timestamp)GROUP BY 1, 2, 3, 4ORDER BY holder_count DESC;