Query editor
selectdate_trunc('day', block_time) as time_period,provider,sum(case when success = true then 1 else 0 end) as daily_requests,sum(case when (chain = 'arbitrum' and success = true) then 1 else 0 end) as arbitrum_requests,sum(case when (chain = 'blast' and success = true) then 1 else 0 end) as blast_requests,sum(case when (chain = 'base' and success = true) then 1 else 0 end) as base_requests,sum(case when (chain = 'optimism' and success = true) then 1 else 0 end) as optimism_requests,sum(case when (chain = 'mode' and success = true) then 1 else 0 end) as mode_requests,sum(sum(case when success = true then 1 else 0 end)) over (order by date_trunc('day', block_time)) as cumulative_requests,sum(sum(case when (chain = 'arbitrum' and success = true) then 1 else 0 end)) over (order by date_trunc('day', block_time)) as cumulative_arbitrum_requests,sum(sum(case when (chain = 'blast' and success = true) then 1 else 0 end)) over (order by date_trunc('day', block_time)) as cumulative_blast_requests,sum(sum(case when (chain = 'base' and success = true) then 1 else 0 end)) over (order by date_trunc('day', block_time)) as cumulative_base_requests,sum(sum(case when (chain = 'optimism' and success = true) then 1 else 0 end)) over (order by date_trunc('day', block_time)) as cumulative_optimism_requests,sum(sum(case when (chain = 'mode' and success = true) then 1 else 0 end)) over (order by date_trunc('day', block_time)) as cumulative_mode_requests,sum(case when success = true then value/1e18 else 0 end) as daily_revnue,sum(case when (chain = 'arbitrum' and success = true) then value/1e18 else 0 end) as arbitrum_revenue,sum(case when (chain = 'blast' and success = true) then value/1e18 else 0 end) as blast_revenue,sum(case when (chain = 'base' and success = true) then value/1e18 else 0 end) as base_revenue,sum(case when (chain = 'optimism' and success = true) then value/1e18 else 0 end) as optimism_revenue,sum(case when (chain = 'mode' and success = true) then value/1e18 else 0 end) as mode_revenue,sum(sum(case when success = true then value/1e18 else 0 end)) over (order by date_trunc('day', block_time)) as cumulative_revenue,sum(sum(case when (chain = 'arbitrum' and success = true) then value/1e18 else 0 end)) over (order by date_trunc('day', block_time)) as cumulative_arbitrum_revenue,sum(sum(case when (chain = 'blast' and success = true) then value/1e18 else 0 end)) over (order by date_trunc('day', block_time)) as cumulative_blast_revenue,sum(sum(case when (chain = 'base' and success = true) then value/1e18 else 0 end)) over (order by date_trunc('day', block_time)) as cumulative_base_revenue,sum(sum(case when (chain = 'optimism' and success = true) then value/1e18 else 0 end)) over (order by date_trunc('day', block_time)) as cumulative_optimism_revenue,sum(sum(case when (chain = 'mode' and success = true) then value/1e18 else 0 end)) over (order by date_trunc('day', block_time)) as cumulative_mode_revenue,sum(case when success = true then gas_fee else 0 end) as daily_fee,sum(case when (chain = 'arbitrum' and success = true) then gas_fee else 0 end) as arbitrum_fee,sum(case when (chain = 'blast' and success = true) then gas_fee else 0 end) as blast_fee,sum(case when (chain = 'base' and success = true) then gas_fee else 0 end) as base_fee,sum(case when (chain = 'optimism' and success = true) then gas_fee else 0 end) as optimism_fee,sum(case when (chain = 'mode' and success = true) then gas_fee else 0 end) as mode_fee,sum(sum(case when success = true then gas_fee else 0 end)) over (order by date_trunc('day', block_time)) as cumulative_fee,sum(sum(case when (chain = 'arbitrum' and success = true) then gas_fee else 0 end)) over (order by date_trunc('day', block_time)) as cumulative_arbitrum_fee,sum(sum(case when (chain = 'blast' and success = true) then gas_fee else 0 end)) over (order by date_trunc('day', block_time)) as cumulative_blast_fee,sum(sum(case when (chain = 'base' and success = true) then gas_fee else 0 end)) over (order by date_trunc('day', block_time)) as cumulative_base_fee,sum(sum(case when (chain = 'optimism' and success = true) then gas_fee else 0 end)) over (order by date_trunc('day', block_time)) as cumulative_optimism_fee,sum(sum(case when (chain = 'mode' and success = true) then gas_fee else 0 end)) over (order by date_trunc('day', block_time)) as cumulative_mode_feefrom query_3900517 basegroup by 1,2order by 1 desc