Query editor
withuser_transactions as (selectdistinct from_hex(CAST(json_extract(transactions, '$[0].hash') AS VARCHAR)) as user_txfrom mevblocker.raw_bundlesWHERE DATE(from_unixtime(cast(timestamp as double)/cast(1000 as double))) BETWEEN (timestamp '{{StartTime}}') and (timestamp '{{EndTime}}' )),mev_blocker_tx_count as (selectdate_trunc('{{Aggregate By}}', block_time) as day,count(*) as num_mevblocker_txfrom user_transactionsinner join ethereum.transactionson user_tx = hashgroup by date_trunc('{{Aggregate By}}', block_time)),evm_tx_count as (selectdate_trunc('{{Aggregate By}}', block_time) as day,count(*) as num_evm_txfrom ethereum.transactionswhere block_time BETWEEN timestamp '{{StartTime}}' AND timestamp '{{EndTime}}'group by date_trunc('{{Aggregate By}}', block_time))selectmev.day,num_mevblocker_tx,num_evm_tx,100.0 * cast(num_mevblocker_tx as double) / cast(num_evm_tx as double) as tx_proportionfrom mev_blocker_tx_count mevinner join evm_tx_count evmon mev.day = evm.day