kenobi9270top 10 wallets successfully earning more USDT or USDC
    Updated 2022-03-29
    with stable_first as (select swap_from_asset_id as first_swap_from_asset_id,
    swap_from_amount as first_swap_from_amount,
    swap_to_asset_id as first_swap_to_asset_id,
    swap_to_amount as first_swap_to_amount,
    swapper as first_swapper,block_timestamp as first_blocktimestamp
    from algorand.swaps
    where block_timestamp::date >= '2022-01-01'
    and (swap_from_asset_id = 31566704
    or swap_from_asset_id = 312769)
    and (swap_to_asset_id != 31566704
    or swap_to_asset_id != 312769)
    )
    , stable_second as (select swap_from_asset_id as second_swap_from_asset_id,
    swap_from_amount as second_swap_from_amount,
    swap_to_asset_id as second_swap_to_asset_id,
    swap_to_amount as second_swap_to_amount,
    swapper as second_swapper,block_timestamp as second_blocktimestamp
    from algorand.swaps
    where block_timestamp::date >= '2022-01-01'
    and (swap_from_asset_id != 31566704
    or swap_from_asset_id != 312769)
    and (swap_to_asset_id = 31566704
    or swap_to_asset_id = 312769)
    )

    select first_swapper,(second_swap_to_amount-first_swap_from_amount) as benefit,
    (second_swap_to_amount/first_swap_from_amount) as Arbitrage,
    first_swap_from_amount,second_swap_to_amount,first_blocktimestamp,second_blocktimestamp
    from stable_first inner join stable_second
    on
    first_swap_to_asset_id=second_swap_from_asset_id
    and
    first_swap_to_amount=second_swap_from_amount
    and
    first_swapper=second_swapper
    and