shibidiloUntitled Query
    Updated 2022-09-26
    with base as (
    select date(block_timestamp) as day,
    tx_hash,
    case
    when token0_symbol = 'WETH' then amount0_usd
    when token1_symbol = 'WETH' then amount1_usd
    end as WETH_USD_deposited,
    case
    when token0_symbol = 'WETH' then amount0_adjusted
    when token1_symbol = 'WETH' then amount1_adjusted
    end as WETH_deposited
    from ethereum.uniswapv3.ez_lp_actions
    where (token0_symbol = 'WETH' or token1_symbol = 'WETH')
    and action = 'INCREASE_LIQUIDITY'
    and day >= '2022-07-01'),

    base2 as (
    select
    date(block_timestamp) as day,
    tx_hash,
    case
    when token0_symbol = 'WETH' then amount0_usd
    when token1_symbol = 'WETH' then amount1_usd
    end as WETH_USD_withdrawn,
    case
    when token0_symbol = 'WETH' then amount0_adjusted
    when token1_symbol = 'WETH' then amount1_adjusted
    end as WETH_withdrawn
    from ethereum.uniswapv3.ez_lp_actions
    where (token0_symbol = 'WETH' or token1_symbol = 'WETH')
    and action = 'DECREASE_LIQUIDITY'
    and day >= '2022-07-01'),

    base3 as (
    select day,
    sum(WETH_USD_withdrawn) as WETH_USD_withdrawn,
    Run a query to Download Data