Query editor
with searcher as (selectdate_trunc('week', evt_block_time) as dt,count(distinct evt_tx_hash) as num_tx,-- avg(gas_price) as avg_gas_price,-- sum(fee_eth) as fee_eth,sum(fee_usd) as fee_usd,avg(fee_usd) as avg_fee_usdfrom query_2449390group by 1), total as (selectdate_trunc('week', block_time) as dt,count(distinct hash) as num_tx,-- avg(gas_price) / 1e9 as avg_gas_price,-- sum(fee_eth) as fee_eth,sum((gas_price * gas_used + l1_fee) / 1e18 * p.price) as fee_usd,avg((gas_price * gas_used + l1_fee) / 1e18 * p.price) as avg_fee_usdfrom optimism.transactions tleft join (select * from prices.usd where blockchain = 'arbitrum' and symbol = 'WETH') pon date_trunc('minute', t.block_time) = p.minutewhere successgroup by 1)selects.dt,s.num_tx as searcher_num_tx,s.fee_usd as searcher_fee,s.avg_fee_usd as searcher_avg_fee,-- s.avg_gas_price as seacher_avg_gas_price,t.num_tx - s.num_tx as total_num_tx,t.fee_usd - s.fee_usd as total_fee,t.avg_fee_usd as total_avg_fee,-- t.avg_gas_price as total_avg_gas_price,cast(s.num_tx as double) / (t.num_tx - s.num_tx) as num_tx_ratio,cast(s.fee_usd as double) / (t.fee_usd - s.fee_usd) as fee_ratiofrom searcher sjoin total t on s.dt = t.dt