Query editor
WITH wallets(label,wallet) AS (VALUES('d5df807e',0xd5df807e32d9d653829b534b3fc1c4cbe8cd4f8a),('55ce9d7e',0x55ce9d7e4c2d6237cfb2d0d8085caa435e617b8a),('088c6a69',0x088c6a69f38291a9c0347828f90ed7e27ecb217f),('9ac67ab5',0x9ac67ab55b09e386e2aa0710f5cf3831108e72ad),('108dbf26',0x108dbf26c5bc8bb2ad28f0af6c4969b5cfec74ff),('dc8e7cc1',0xdc8e7cc178e355532eabc7d3e6236dedb379f14e)),e AS (SELECT x.* FROM dune.tusa3112.result_rh_6505_fresh_broad_events xJOIN wallets w ON w.wallet=x.wallet),tx AS (SELECT label,wallet,tx_hash,block_time,block_number,tx_index,success,target,selector,MAX(tx_cash_usd) tx_cash_usd,SUM(assigned_gas_usd) gas_usd,MAX(CAST(token_out>1e-12 AS INTEGER)) has_nonquote_out,MAX(CAST(token_in>1e-12 AS INTEGER)) has_nonquote_inFROM e GROUP BY 1,2,3,4,5,6,7,8,9),cash AS (SELECT label,wallet,COUNT(*) attempts,COUNT_IF(NOT success) reverts,SUM(gas_usd) all_gas_usd,SUM(GREATEST(tx_cash_usd,0e0)) positive_cash_usd,SUM(IF(tx_cash_usd>0e0 AND has_nonquote_out=1,tx_cash_usd,0e0)) sale_positive_usd,SUM(IF(tx_cash_usd>0e0 AND has_nonquote_out=0,tx_cash_usd,0e0)) non_token_positive_usd,COUNT_IF(tx_cash_usd>0e0 AND has_nonquote_out=0) non_token_positive_txs,COUNT(DISTINCT target) targets,COUNT(DISTINCT selector) selectors,COUNT_IF(target=0x65050a9b7e5075a2ba5ced7b1b64ee66262c40dcAND selector=0x4d819a2a) router_callsFROM tx GROUP BY 1,2),owned AS (SELECT w.label,w.wallet,COUNT(DISTINCT c.address) directly_owned_contractsFROM wallets w LEFT JOIN robinhood.creation_traces c ON c."from"=w.walletAND c.block_month>=DATE '2026-07-01'GROUP BY 1,2),fund AS (SELECT w.label,w.wallet,MIN_BY(tr."from",tr.block_time) initial_funder,MIN(tr.block_time) initial_funding_time,MIN_BY(tr.amount,tr.block_time) initial_funding_eth,SUM(COALESCE(tr.amount,0e0)) all_external_native_in_eth,COUNT(DISTINCT tr."from") funding_sourcesFROM wallets w JOIN tokens.transfers tr ON tr.blockchain='robinhood'AND tr.block_date>=DATE '2026-07-01' AND tr.block_date<=CURRENT_DATEAND LOWER(tr.token_standard)='native' AND tr."to"=w.wallet AND tr."from"<>w.walletAND COALESCE(tr.tx_from,0x0000000000000000000000000000000000000000)<>w.walletGROUP BY 1,2),pt AS (SELECT label,wallet,token,MIN(IF(buy_cost_usd>0e0,block_time,NULL)) first_paid_buy,MAX(IF(proceeds_usd>0e0,block_time,NULL)) last_cash_sell,SUM(buy_cost_usd) paid_buy_usd,SUM(proceeds_usd) proceeds_usdFROM e WHERE token IS NOT NULL GROUP BY 1,2,3),created AS (SELECT p.*,c."from" creator,c.block_time creation_time,DATE_DIFF('second',c.block_time,p.first_paid_buy) creation_to_entry_sec,DATE_DIFF('second',p.first_paid_buy,p.last_cash_sell) first_buy_to_last_sell_secFROM pt p LEFT JOIN robinhood.creation_traces c ON c.address=p.tokenAND c.block_month>=DATE '2026-07-01'