Afonso_Diazliquidity overtime
    Updated 2023-12-31
    with t as (
    select
    tx_hash,
    action,
    block_timestamp,
    iff(block_timestamp::date >= '2023-08-27', 'Bull Market', 'Bear Market') as timespan,
    liquidity_provider,
    amount0_usd + amount1_usd as amount_usd
    from
    ethereum.uniswapv3.ez_lp_actions
    where amount_usd < 1e7
    ),
    t2 as (
    select
    date_trunc('month', min_date) as month,
    count(distinct new_user) as new_liquidity_provider
    from
    (
    select
    liquidity_provider as new_user,
    min(block_timestamp) as min_date
    from
    t
    group by
    1
    )
    group by
    1
    ),
    t3 as (
    select
    date_trunc('month', block_timestamp) as month,
    timespan,
    count(distinct tx_hash) as transactions,
    count(distinct liquidity_provider) as liquidity_providers,
    sum(
    QueryRunArchived: QueryRun has been archived