Query editor
with binance_token_contract as (select distinct"contract_address" as contract_address,"token_symbol" as token_symbolfrom dune.m1kuw1ll.dataset_binance_available_contracts_20230808_20250308),base_fee as (select "number" as block_number,base_fee_per_gas as base_fee,minerfrom ethereum.blockswhere ("time" between date('2023-08-08') and date('2025-03-08'))),mempool_distinct as (select distinct hashfrom dune.flashbots.dataset_mempool_dumpsterwhere (from_unixtime(cast(timestamp_ms as decimal)/1000)between date('2023-08-08') and date('2025-03-08'))),gas_fee_n_privacy as (select t.block_number,t.block_time as block_time,t.block_date as block_date,t.hash as tx_hash,t.index as tx_index,"from" as from_addr,to as to_addr,case when "from" = miner then 1 else 0 end as builder_tx,value/1e18 as eth_value,gas_used,((gas_used / 1e18) * (gas_price - base_fee)) as priority_fees,((gas_used / 1e18) * base_fee) as base_fees,lag(case when "from" = miner then 1 else 0 end) over (partition by t.block_number order by t.index desc) as ofafrom ethereum.transactions tjoin base_fee b on b.block_number = t.block_numberleft join mempool_distinct p on from_hex(p.hash) = t.hashwhere (block_time between date('2023-08-08') and date('2025-03-08'))and p.hash is null),coinbase as (selectt.tx_hash,(value/1e18) as cb_transferfrom ethereum.traces tjoin ethereum.blocks b on t.block_number = b.numberwhere to = b.minerand success = trueand (block_time between date('2023-08-08') and date('2025-03-08'))),logs as (select tx_hash,sum(case when asset_type = 'erc20' then 1 else 0 end) as transfers_erc20,sum(case when asset_type = 'erc721' then 1 else 0 end) as transfers_erc721from (select tx_hash,