Query editor
selectdt,sum(tvl) over (order by dt) as total_tvlfrom (selectdt,sum(amount) as tvlfrom (selectdate_trunc('hour', evt_block_time) as dt,sum(value / 1e18 * price) as amountfrom erc20_ethereum.evt_Transfer ajoin prices.usd b on date_trunc('minute', a.evt_block_time) = b.minute and b.contract_address = 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2where a.contract_address = 0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0and to = 0x5F59b322eB3e16A0C78846195af1F588b77403FCgroup by 1union allselectdate_trunc('hour', evt_block_time) as dt,-sum(value / 1e18 * price) as amountfrom erc20_ethereum.evt_Transfer ajoin prices.usd b on date_trunc('minute', a.evt_block_time) = b.minute and b.contract_address = 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2where a.contract_address = 0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0and "from" = 0x5F59b322eB3e16A0C78846195af1F588b77403FCgroup by 1)group by 1)