boomer77slippage percentage by pool
    Updated 2022-02-01
    with raw as (select *, case
    when from_amount_usd < 10 then '1. 0-10'
    when from_amount_usd between 10 and 100 then '2. 10-100'
    when from_amount_usd between 100 and 1000 then '3. 100-1000'
    when from_amount_usd between 1000 and 10000 then '4. 1000-10,000'
    when from_amount_usd between 10000 and 100000 then '5. 10,000-100,000'
    when from_amount_usd between 100000 and 1000000 then '6. 100,000-1,000,000'
    else '7. >1M' end as swap_size
    from thorchain.swaps
    where block_timestamp >= CURRENT_DATE - 60)

    select pool_name, swap_size, avg(swap_slip_bp/100) as "slippage %"
    from raw
    group by 1,2
    order by 1 asc
    Run a query to Download Data