articoloquintoPercentage of arbs transactions over the total swaps
    Updated 2022-07-20
    with arb_transactions as (select 'arbs' as "status", sum("transactions") as "transactions" from(
    select * from(
    select distinct t.address as "arb bots", count(distinct tx_id) as "transactions" from(
    select block_timestamp as date, dateadd(minute, -5, date) as "date-5", dateadd(minute, 5, date) as "date+5", from_address as address, tx_id
    from flipside_prod_db.thorchain.swaps
    where block_timestamp >= '2022-01-01'
    and blockchain = 'ETH') as t
    inner join(
    select block_timestamp as date, tx_to as address
    from ethereum.core.ez_dex_swaps
    where block_timestamp >= '2022-01-01') as e
    on t.address = e.address and e.date between t."date-5" and t."date+5"
    group by 1)
    where "transactions" > 20))
    select * from arb_transactions
    UNION
    select 'normal swaps' as "status", count(distinct tx_id)-(select "transactions" from arb_transactions) as "transactions"
    from flipside_prod_db.thorchain.swaps
    where block_timestamp >= '2022-01-01'
    and blockchain = 'ETH'




    Run a query to Download Data