Query editor
with provider_fee as (selectevt_block_time as timestamp,provider,amount / 1e18 as revenue_ethfrom donutcompany_base.miner_evt_miner__providerfeewhere contract_address = from_hex('0xF69614F4Ee8D4D3879dd53d5A039eB3114C794F6')),eth_prices as (selectminute,avg(price) as eth_usdfrom prices.usdwhere symbol = 'WETH'and blockchain = 'base'group by minute),provider_usd as (selectp.provider,p.revenue_eth * pr.eth_usd as revenue_usd,casewhen p.provider = from_hex('0xba366c82815983ff130c23ced78bd95e1f2c18ea') then 'GlazeCorp'when p.provider = from_hex('0xce70B8b8B61de260E4d22acCe46B0b2baf348BFE') then 'Pinky Glazers'else 'Other'end as shop_namefrom provider_fee pleft join eth_prices pron date_trunc('minute', p.timestamp) = pr.minute)selectprovider,shop_name,sum(revenue_usd) as total_revenue_usd,count(*) as glaze_countfrom provider_usdgroup by provider, shop_nameorder by total_revenue_usd desc