Query editor
with mined as (selectevt_block_time as timestamp,evt_tx_hash as glaze_id,miner,price, -- ETH value in wei (1e18)urifrom donutcompany_base.miner_evt_miner__minedwhere contract_address = from_hex('0xF69614F4Ee8D4D3879dd53d5A039eB3114C794F6')),minted as (selectevt_tx_hash,amount as mined_rawfrom donutcompany_base.miner_evt_miner__mintedwhere contract_address = from_hex('0xF69614F4Ee8D4D3879dd53d5A039eB3114C794F6')),miner_fee as (selectevt_tx_hash,amount as earned_rawfrom donutcompany_base.miner_evt_miner__minerfeewhere contract_address = from_hex('0xF69614F4Ee8D4D3879dd53d5A039eB3114C794F6')),provider_fee as (selectevt_tx_hash,provider as shopfrom donutcompany_base.miner_evt_miner__providerfeewhere contract_address = from_hex('0xF69614F4Ee8D4D3879dd53d5A039eB3114C794F6')),-- Glaze in ETHglaze as (selectm.timestamp,m.glaze_id,m.miner as user,pf.shop,m.price / 1e18 as spent_eth,coalesce(mf.earned_raw, 0) / 1e18 as earned_eth,coalesce(mi.mined_raw, 0) / 1e18 as mined_donut,m.urifrom mined mleft join minted mi on mi.evt_tx_hash = m.glaze_idleft join miner_fee mf on mf.evt_tx_hash = m.glaze_idleft join provider_fee pf on pf.evt_tx_hash = m.glaze_id),-- ETH/USD price per minute on Base, 1 row per minuteeth_prices as (selectminute,avg(price) as eth_usdfrom prices.usdwhere symbol = 'WETH'and blockchain = 'base'