Query editor
-- Robinhood Chain: daily transactions broken out by individual stock token contract.-- Top 12 tokens by lifetime tx count are named; the rest roll up to "Other stock tokens".---- Note: a tx touching two stock tokens counts once for each, so the stacked total can-- slightly exceed the single stock-token bucket on the Transactions by Type panel.---- symbol is coalesced: a NULL symbol would otherwise null the entire label-- concatenation and silently produce an unlabelled series.WITH tokens AS (SELECT stock AS token, max(symbol) AS symbolFROM rwa_stock_factory_robinhood.factory_deployer_evt_deployedGROUP BY 1),first_deploy AS (SELECT min(evt_block_date) AS dFROM rwa_stock_factory_robinhood.factory_deployer_evt_deployed),per_day AS (SELECTl.block_date AS day,l.contract_address AS token,count(DISTINCT l.tx_hash) AS txsFROM robinhood.logs lWHERE l.contract_address IN (SELECT token FROM tokens)AND l.block_date >= (SELECT d FROM first_deploy)GROUP BY 1, 2),top_tokens AS (SELECT tokenFROM per_dayGROUP BY 1ORDER BY sum(txs) DESCLIMIT 12)SELECTp.day,CASEWHEN p.token IN (SELECT token FROM top_tokens)THEN coalesce(t.symbol, '(no symbol)') || ' 0x'|| lower(substr(to_hex(p.token), 1, 6))|| '…'|| lower(substr(to_hex(p.token), 37, 4))ELSE 'Other stock tokens'END AS token_label,sum(p.txs) AS txsFROM per_day pJOIN tokens t ON t.token = p.tokenGROUP BY 1, 2ORDER BY p.day, txs DESC