Query editor
WITH wsteth_data as (selectday,avg(usd_value_locked) as usd_value_lockedfrom (WITH wsteth_price AS (SELECTprice AS wsteth_price_currentFROMprices.usdWHEREcontract_address = 0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0ORDER BYminute descLIMIT 1),daily_tvl AS (selectdate_trunc('day', evt_block_time) as day,sum(value / 1e18) as amountfromerc20_ethereum.evt_Transfer awherecontract_address = 0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0and to = 0x5F59b322eB3e16A0C78846195af1F588b77403FCgroup by 1union allselectdate_trunc('day', evt_block_time) as day,-sum(value / 1e18) as amountfromerc20_ethereum.evt_Transfer awherecontract_address = 0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0and "from" = 0x5F59b322eB3e16A0C78846195af1F588b77403FCgroup by 1order by 1 desc)SELECTday,sum(amount) over (order by day) * wsteth_price_current as usd_value_lockedFROM daily_tvlCROSS JOIN wsteth_pricewhere day >= cast('2023-05-01 00:00' as timestamp)order by 1 desc)group by 1order by 1 desc),r_circ_supply as (with mints_burns as (selectdate_trunc('day', call_block_time) as day