Query editor
WITHunited_added as (selectdate_trunc('day', evt_block_time) as period,cast(amount as double) as amountfrom azuro_gnosis.LP_evt_LiquidityAddedwhere evt_block_time < cast('2023-01-29' as timestamp)),united_removed as (selectdate_trunc('day', evt_block_time) as period,cast(amount as double) as amountfrom azuro_gnosis.LP_evt_LiquidityRemovedwhere evt_block_time < cast('2023-01-29' as timestamp)),liq_events_v1 as ((selectperiod,amountfrom united_added)union all(selectperiod,- amountfrom united_removed)),liq_result_v1 as (selectperiod,sum(amount)/1e18 as amountfrom liq_events_v1group by period),gnosis_lp_v1 as (selectperiod,sum(amount) over (order by period) as liquidityfrom liq_result_v1), ----- ONLY GNOSIS V1liq_events as ((selectdate_trunc('day', evt_block_time) as period,cast(value / 1e6 as double) as amountfrom tether_arbitrum.ArbitrumExtension_evt_Transferwhere trueand evt_block_number > 98354147and to = 0x20513ba6A4717c67e14291331BC99dd2aCE90038 -- Arbitrum)union all(selectdate_trunc('day', evt_block_time) as period,-cast(value / 1e6 as double) as amountfrom tether_arbitrum.ArbitrumExtension_evt_Transferwhere trueand evt_block_number > 98354147and "from" = 0x20513ba6A4717c67e14291331BC99dd2aCE90038 -- Arbitrum