Saleha.a-profit eth
    Updated 2022-07-20
    with bot as (
    select
    from_address as user
    ,count(distinct TX_ID) as tx_count
    ,sum(FROM_AMOUNT) as amount
    from thorchain.swaps
    where block_timestamp::date>= '2021-10-01'
    and from_address like '0x%'
    group by 1
    having tx_count>100
    )
    select
    origin_from_address
    ,count(DISTINCT tx_hash) as tx_count
    ,sum(AMOUNT_OUT_USD-AMOUNT_IN_USD) as profit
    from ethereum.core.ez_dex_swaps
    where origin_from_address in (
    select user from bot
    )
    group by 1
    having profit>0
    -- order by 1

    Run a query to Download Data