Tony_Intel4 - users per inactive month
    Updated 2023-09-18
    with source as (
    select distinct
    trader,
    date_trunc('month', block_timestamp) as month
    from crosschain.defi.ez_dex_swaps
    where
    platform ilike '%uniswap%' and
    blockchain in ('ethereum', 'optimism', 'arbitrum', 'polygon') and
    amount_in_usd <= 15000000 and
    amount_out_usd <= 15000000 and
    block_timestamp::date >= '2022-01-01'
    ),
    before_2206 as (
    select distinct
    trader,
    date_trunc('month', ('2022-05-25'/*A random date which is before 2022/06/01 */::date)) as month
    from (
    select distinct trader
    from source
    where
    month::date < '2022-06-01'
    )
    ),
    after_2206 as (
    select distinct
    x.trader,
    (DATEDIFF(month, x.date, '2023-09-01'::DATE) + 1) as month_number
    from source c
    join (
    select distinct
    trader,
    rank() over (partition by trader order by month) as rank,
    month as date
    from source
    where
    month::date >= '2022-06-01' and
    Run a query to Download Data