phu44. daily redeploy liquidity after the merge
    Updated 2022-10-04
    with
    pool_cte as (
    select
    pool_address
    , pool_name
    from ethereum.core.dim_dex_liquidity_pools
    where 1=1
    and platform = 'sushiswap'
    )
    , remove_cte as (
    select
    origin_from_address
    , sum(ifnull(amount_usd,0)) amount_usd
    from ethereum.core.ez_token_transfers
    where origin_to_address = '0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f'
    and origin_function_signature in ('0x02751cec','0x2195995c','0x5b0d5984','0xaf2979eb','0xbaa2abde','0xded9382a') -- remove liquidity
    and amount > 0
    and BLOCK_TIMESTAMP::date > '2022-09-01'
    and BLOCK_TIMESTAMP::date <= '2022-09-15'
    and block_number < 15537394 -- first POS block
    and to_address = origin_from_address
    and symbol != 'SLP'
    group by 1
    )
    select
    BLOCK_TIMESTAMP::date date
    , sum(ifnull(amount_usd,0)) amount_usd
    from ethereum.core.ez_token_transfers
    where 1=1
    and origin_to_address = '0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f'
    and origin_function_signature in ('0xe8e33700','0xf305d719') -- add liquidity
    and to_address in (select pool_address from pool_cte)
    and BLOCK_TIMESTAMP::date >= '2022-09-15'
    and BLOCK_TIMESTAMP::date < '2022-09-28'
    and block_number >= 15537394 -- first POS block
    and origin_from_address in (select origin_from_address from remove_cte)
    Run a query to Download Data