zakkisyed#8 THORchain Arbitration ETH Bots
    Updated 2022-07-20
    with bots as (select
    from_address as eth_bot,
    block_timestamp::date as date,
    count(distinct tx_id) as number_of_txs
    from flipside_prod_db.thorchain.swaps
    where blockchain = 'ETH'
    -- and block_timestamp >='2022-01-01'
    group by 1,2
    having number_of_txs >= 50)

    select from_address,
    case when to_asset like '%-%' then substring(to_asset, 0, charindex('-', to_asset) - 1)
    else to_asset
    end as to_token,
    count(distinct tx_id) as number_of_txs,
    sum(to_amount_usd) as volume
    from flipside_prod_db.thorchain.swaps
    where from_address in (select distinct eth_bot from bots)

    group by 1,2

    Run a query to Download Data