Query editor
selectcoalesce(sum(case when tr.success then 1 else 0 end), 0) as mined,coalesce(sum(case when tr.success then 0 else 1 end), 0) as failed,sum(tr.gas_used) as gas_spent,sum(tr.gas_used * tx.gas_price / 1e18) as eth_spent,sum(tr.gas_used * tx.gas_price * p.price / 1e18) as usd_spent,sum(tr.gas_used * bl.base_fee_per_gas / 1e18) as eth_burned,sum(tr.gas_used * bl.base_fee_per_gas * p.price / 1e18) as usd_burnedfrom ethereum.traces trleft join ethereum.transactions tx on tx.hash = tr.tx_hashleft join ethereum.blocks bl on bl.number = tr.block_numberleft join prices."layer1_usd" p on p.symbol = 'ETH' and p.minute = date_trunc('minute', tr.block_time)where tr.call_type = 'call' and tr.block_time > '2021-12-15'and tr."to" = '\x7B1AAF21AC0D420666B5966338FF9aEe763C29DF'and substring(tr.input from 1 for 4) = '\xae0b51df' -- '\x936cb29e'--select * from ethereum.traces where "to" = '\x7B1AAF21AC0D420666B5966338FF9aEe763C29DF'-- select-- 1000 as mined,-- 200 as failed,-- 240000000 as gas_spent,-- 254.6 as eth_spent,-- 6456546.32 as usd_spent,-- 2346 as eth_burned,-- 234234324 as usd_burned