Query editor
withsearcher_transactions as (selectfrom_hex(CAST(json_extract(transactions, '$[1].hash') AS VARCHAR)) as searcher_tx,max(from_hex(CAST(json_extract_scalar(transactions, '$[1].from') AS VARCHAR))) as searcher_address,max(from_hex(CAST(json_extract_scalar(transactions, '$[1].to') AS VARCHAR))) as searcher_contract,min(timestamp) as requested_timefrom mevblocker.raw_bundleswhere json_array_length(transactions) > 1group by 1), stats as (SELECT date_trunc('day', from_unixtime(requested_time / 1000.0)) as day,searcher_address as searcher_eoa,count(distinct searcher_contract) as searcher_contract_ctfrom searcher_transactionsjoin ethereum.transactions t on searcher_tx = t.hashwhere t.hash is not nullgroup by 1 , 2) select day,case when searcher_contract_ct = 1 then '1. 1 contract'when searcher_contract_ct = 2 then '2. 2 contracts'when searcher_contract_ct = 3 then '3. 3 contracts'else '4. >3 contracts' end as contracts_ct,count(*) as searcher_eoa_ctfrom statsgroup by 1, 2