vivianngdoraP1 - GLP 3.1 - txn
    Updated 2023-10-23
    with p1 as (
    select block_timestamp,tx_hash,liquidity_provider,action,liquidity_adjusted,
    amount0_usd+amount1_usd as liquidity_usd,token0_symbol,token1_symbol,
    pool_address,pool_name
    from ethereum.uniswapv3.ez_lp_actions
    where liquidity_usd is not null
    and liquidity_usd - liquidity_adjusted<liquidity_usd*0.7
    and action = 'INCREASE_LIQUIDITY'
    AND (token0_symbol ilike '%USD%' or token0_symbol = 'DAI' OR
    token1_symbol ilike '%USD%' or token1_symbol = 'DAI')
    and (token0_symbol != 'WETH' and token1_symbol != 'WETH')
    and pool_name not in (
    select distinct pool_name
    from ethereum.uniswapv3.ez_lp_actions
    where
    (token0_symbol ilike '%USD%' or token0_symbol = 'DAI') and
    (token1_symbol ilike '%USD%' or token1_symbol = 'DAI')))
    select case when liquidity_usd >=0 and liquidity_usd < 1000 then 'Liquidity_usd is less than 1K'
    when liquidity_usd >=1000 and liquidity_usd < 10000 then '1K <= Liquidity_usd < 10K'
    when liquidity_usd >=10000 and liquidity_usd < 100000 then '10K <= Liquidity_usd < 100K'
    when liquidity_usd >=100000 and liquidity_usd < 1000000 then '100K <= Liquidity_usd < 1M'
    when liquidity_usd >=1000000 and liquidity_usd < 10000000 then '1M <= Liquidity_usd < 10M'
    else 'Liquidity_usd is more than 10M' END AS TYPE,
    count (distinct tx_hash) as count_transaction
    from p1
    group by 1



    Run a query to Download Data