Keyrockuni3_lp_distribution

    with pool_info as (
    select
    pool_address,
    pool_name,
    block_timestamp as pool_create_time,

    tick_spacing,
    fee_percent,

    token0_address,
    token0_symbol,
    token0_decimals,

    token1_address,
    token1_symbol,
    token1_decimals

    from ethereum.uniswapv3.ez_pools
    where pool_address = lower('{{pool_address}}')
    limit 1 -- can only match exactly one pool
    ),

    mint_burn as (
    select
    lp.tick_lower,
    lp.tick_upper,
    pinfo.tick_spacing,
    case
    -- liquidity is misnomer, it's NOT new liquidity after action
    -- it's delta liquidity in that action
    when lp.action = 'INCREASE_LIQUIDITY' then lp.liquidity
    when lp.action = 'DECREASE_LIQUIDITY' then -1*lp.liquidity
    end as delta_liquidity
    from ethereum.uniswapv3.ez_lp_actions lp
    Run a query to Download Data