Query editor
with daily_transaction as (select date_trunc('day', block_time) as block_date,"to" as contract_address,count(*) as transaction_count,sum(cast(effective_gas_price as double)) / 1e9 as fee_per_gasfrom arbitrum.transactionswhere success = trueand block_date = DATE {{Date of Tx}} -- Highlight: Filter transactions for the specific dategroup by 1, 2),top_contract_by_gas_fee as (select contract_address,sum(fee_per_gas) as gas_fee_consumed,sum(transaction_count) as total_transaction_countfrom daily_transactionwhere contract_address is not nullgroup by contract_addressorder by sum(fee_per_gas) desclimit 20),contract_info as (select distinct address,first_value(name) over (partition by address order by created_at) as contract_namefrom labels.allwhere blockchain = 'arbitrum'and address in (select contract_address from top_contract_by_gas_fee))select row_number() over (order by gas_fee_consumed desc) as rank_id,cast(contract_address as varchar) as contract_address,coalesce(c.contract_name, cast(contract_address as varchar)) as name,'<a href=https://arbiscan.io/address/' || cast(contract_address as varchar) || ' target=_blank>ArbiScan</a>' as link,gas_fee_consumed,total_transaction_countfrom top_contract_by_gas_fee tleft join contract_info c on t.contract_address = c.addressorder by gas_fee_consumed desc