Query editor
select case when to = 0xe347C1223381b9Dcd6c0F61cf81c90175A7Bae77 then 'deri'when to = 0x995a9d3ca121d48d21087ede20bc8acb2398c8b1 then 'xai' else 'others'end as flag, to, bytearray_substring(data,1,4) as methodid, count(distinct block_date) as no_days, sum(effective_gas_price*gas_used/power(10,18)) as total_tx_fee_eth, sum(effective_gas_price*gas_used/power(10,18)*price) as total_tx_fee_usd, avg(effective_gas_price*gas_used/power(10,18)) as avg_tx_fee_eth, avg(effective_gas_price*gas_used/power(10,18)*price) as avg_tx_fee_usd, approx_percentile(effective_gas_price*gas_used/power(10,18),0.5) as median_tx_fee_eth, approx_percentile(price*effective_gas_price*gas_used/power(10,18),0.5) as median_tx_fee_usd, count(distinct hash) as tx_hash, count(distinct "from") as from_address_cntfrom arbitrum.transactions tleft join prices.usd_latest p on blockchain='arbitrum' and contract_address=0x82aF49447D8a07e3bd95BD0d56f35241523fBab1 --weth price on arb onewhere bytearray_substring(data,1,4) in ( 0x8f111f3c , 0x3e5aa082, 0xe0bc9729)and date_trunc('day',block_time) >= timestamp '2024-06-01'group by 1,2 , 3order by total_tx_fee_eth desc--select *--from prices.usd_latest where contract_address=0x82aF49447D8a07e3bd95BD0d56f35241523fBab1--and hash=0x752927240acecbc22e280fa94be2cf73d6dd979ab214b8771ab7ef60359873e4