Query editor
WITH time_range AS(selectdate_trunc('day',time) as stat_datefrom ethereum.blockswhere date>=timestamp '2022-12-17'group by 1order by 1),ethereum_RebateCollected_event as(SELECTdate_trunc('day',block_time) as stat_date,sum(varbinary_to_uint256(varbinary_substring(data,1+32*2,32)) ) / CAST(1e18 AS DOUBLE) as token-- ,varbinary_to_uint256(varbinary_substring(data,1+32*3,32)) as protocolTax-- ,varbinary_to_uint256(varbinary_substring(data,1+32*4,32)) as curationFees-- ,varbinary_to_uint256(varbinary_substring(data,1+32*5,32)) as queryFees-- ,varbinary_to_uint256(varbinary_substring(data,1+32*6,32)) as queryRebates-- ,varbinary_to_uint256(varbinary_substring(data,1+32*7,32)) as delegationRewardsFROM ethereum.logswhere contract_address=0xf55041e37e12cd407ad00ce2910b8269b01263b9and topic0=0xf5ded07502b6feba4c13b19a0c6646efd4b4119f439bcbd49076e4f0ed1eec4band block_time>timestamp'2023-09-01'group by 1order by 1),ethereum_AllocationCollected_event as(SELECTdate_trunc('day',evt_block_time) as stat_date,SUM(tokens) / CAST(1e18 AS DOUBLE) as tokenFROM thegraph_ethereum.Staking_evt_AllocationCollectedgroup by 1order by 1),arbitrum_RebateCollected_event as(SELECTdate_trunc('day',block_time) as stat_date,sum(varbinary_to_uint256(varbinary_substring(data,1+32*2,32)) ) / CAST(1e18 AS DOUBLE) as tokenFROM arbitrum.logswhere contract_address=0x00669A4CF01450B64E8A2A20E9b1FCB71E61eF03and topic0=0xf5ded07502b6feba4c13b19a0c6646efd4b4119f439bcbd49076e4f0ed1eec4band block_time>timestamp'2023-09-01'group by 1order by 1),arbitrum_AllocationCollected_event as(SELECTdate_trunc('day',evt_block_time) as stat_date,SUM(tokens) / CAST(1e18 AS DOUBLE) as tokenFROM thegraph_arbitrum.Staking_evt_AllocationCollectedgroup by 1order by 1)