Query editor
WITH days_seq AS (SELECTsequence(date('2023-12-12'), date_trunc('day', cast(now() as timestamp)), interval '1' day) AS days),dates as (SELECT days.dayFROM days_seqCROSS JOIN unnest(days) AS days(day)),inflows_peas_all as (SELECT date_trunc('day', evt_block_time) as day, (SUM(value) OVER(ORDER BY evt_block_time))/1e18 as total_inflowsFROM erc20_ethereum.evt_TransferWHERE "to" = 0x44c95bf226a6a1385beaced2bb3328d6afb044a3AND contract_address = 0x02f92800f57bcd74066f5709f1daa1a4302df875ORDER BY 1 DESC),inflows_weth_all as (SELECT date_trunc('day', evt_block_time) as day, (SUM(value) OVER(ORDER BY evt_block_time))/1e18 as total_inflowsFROM erc20_ethereum.evt_TransferWHERE "to" = 0x44c95bf226a6a1385beaced2bb3328d6afb044a3AND contract_address = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2ORDER BY 1 DESC),inflows_peas as (SELECT distinct day, max(total_inflows) as total_inflowsFROM inflows_peas_allGROUP BY 1),inflows_weth as (SELECT distinct day, max(total_inflows) as total_inflowsFROM inflows_weth_allGROUP BY 1),outflows_peas_all as (SELECT date_trunc('day',evt_block_time) as day, (SUM(value) OVER(ORDER BY evt_block_time))/1e18 as total_outflowsFROM erc20_ethereum.evt_TransferWHERE "from" = 0x44c95bf226a6a1385beaced2bb3328d6afb044a3AND contract_address = 0x02f92800f57bcd74066f5709f1daa1a4302df875ORDER BY 1 DESC),outflows_weth_all as (SELECT date_trunc('day',evt_block_time) as day, (SUM(value) OVER(ORDER BY evt_block_time))/1e18 as total_outflowsFROM erc20_ethereum.evt_TransferWHERE "from" = 0x44c95bf226a6a1385beaced2bb3328d6afb044a3AND contract_address = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2ORDER BY 1 DESC),outflows_peas as (SELECT distinct day, max(total_outflows) as total_outflowsFROM outflows_peas_all