alitaslimiLiquidity Pools Over Time
    Updated 2023-11-07
    with
    ------------------------------ Balance Changed Logs ------------------------------
    balance_change_logs as (
    -- Multicall
    select
    block_timestamp,
    tx_hash,
    to_varchar(decoded_log:liquidityProvider) as liquidity_provider,
    decoded_log:poolId as pool_id
    from
    avalanche.core.ez_decoded_event_logs
    where
    tx_status = 'SUCCESS'
    and event_name = 'PoolBalanceChanged'
    and contract_address = '0xba12222222228d8ba445958a75a0704d566bf2c8'
    and origin_to_address = '0xba12222222228d8ba445958a75a0704d566bf2c8'
    union all
    -- Multicall
    select
    block_timestamp,
    tx_hash,
    to_varchar(decoded_log:liquidityProvider) as liquidity_provider,
    decoded_log:poolId as pool_id
    from
    avalanche.core.ez_decoded_event_logs
    where
    tx_status = 'SUCCESS'
    and event_name = 'PoolBalanceChanged'
    and contract_address = '0xba12222222228d8ba445958a75a0704d566bf2c8'
    and origin_to_address = '0x03f1ab8b19bce21eb06c364aec9e40322572a1e9'
    ),
    balance_change_transfers as (
    select
    logs.block_timestamp,
    logs.tx_hash,
    logs.pool_id,
    Run a query to Download Data