Query editor
WITH activations AS (SELECTfrom_hex(substr(to_hex(input), 33, 40)) AS program,min(block_time) AS activated_atFROM robinhood.tracesWHERE block_date >= DATE '2026-01-01'AND "to" = 0x0000000000000000000000000000000000000071AND bytearray_starts_with(input, 0x58c780c2)AND successGROUP BY 1),calls AS (SELECTt."to" AS program,count(*) AS call_count,count(DISTINCT t.tx_hash) AS tx_count,count(DISTINCT t.tx_from) AS distinct_senders,approx_percentile(t.gas_used, 0.5) AS median_gas,min(t.gas_used) AS min_gas,max(t.block_time) AS last_callFROM robinhood.traces tJOIN activations a ON a.program = t."to"WHERE t.block_date >= DATE '2026-01-01'AND t.call_type = 'call'GROUP BY 1)SELECTconcat('0x', to_hex(a.program)) AS program,a.activated_at,coalesce(c.call_count, 0) AS call_count,coalesce(c.tx_count, 0) AS tx_count,coalesce(c.distinct_senders, 0) AS distinct_senders,c.median_gas,c.min_gas,c.last_callFROM activations aLEFT JOIN calls c ON c.program = a.programORDER BY call_count DESC