Query editor
with wsteth_deposits as (SELECT cast(value as DOUBLE)/1e18 as value , evt_block_time, "from" as address FROM erc20_ethereum.evt_Transferwhere contract_address = 0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84and "to" = 0x97de57ec338ab5d51557da3434828c5dbfada371UNIONSELECT cast(value as DOUBLE)/-1e18 as value , evt_block_time, "to" as address FROM erc20_ethereum.evt_Transferwhere contract_address = 0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84and "from" = 0x97de57ec338ab5d51557da3434828c5dbfada371),wsteth_deposited as (SELECT sum(value) as wsteth_deposited,date_trunc('day', evt_block_time) as day, count(address) as dau FROM wsteth_depositsGROUP BY 2),wsteth_deposited_joined as (SELECT COALESCE(wsteth_deposited, 1e-18) as value, wsteth_deposited, day, dau FROM wsteth_deposited),wsteth_deposited_over_time as (SELECT (SELECT price from prices.usd_latest where symbol = 'stETH' and blockchain = 'ethereum') * sum(value) OVER (ORDER BY DAY) as steth_usd,sum(value) OVER (ORDER BY DAY) as steth_deposited_over_time,wsteth_deposited * (SELECT price from prices.usd_latest where symbol = 'stETH' and blockchain = 'ethereum') as steth_usd_deposits, wsteth_deposited as daily_steth_deposits, day, dau FROM wsteth_deposited_joined)SELECT * FROM wsteth_deposited_over_timeORDER BY 5 DESC