Updated 2022-07-27
    with may_balance as(
    select
    row_number() over (order by sum(BALANCE) desc) as rank_id,
    USER_ADDRESS ,
    avg(balance),
    avg(amount_usd)
    from flipside_prod_db.ethereum.erc20_balances
    where balance_date>= '2022-05-01' and balance_date < '2022-06-01'
    and amount_usd > 1000000
    and CONTRACT_ADDRESS ='ETH'
    and LABEL is null
    and lABEL_TYPE is null
    GROUP by 2
    order by 1 asc
    limit 20
    ),

    june_balance as(
    select
    row_number() over (order by sum(BALANCE) desc) as rank_id,
    USER_ADDRESS ,
    avg(balance),
    avg(amount_usd)
    from flipside_prod_db.ethereum.erc20_balances
    where balance_date>= '2022-06-01' and balance_date < '2022-07-01'
    and amount_usd > 1000000
    and CONTRACT_ADDRESS ='ETH'
    and LABEL is null
    and lABEL_TYPE is null
    GROUP by 2
    order by 1 asc
    limit 20
    )

    select * , 'June balance' as Period from june_balance
    union ALL
    Run a query to Download Data