h4wkAll Pool Swap Distribution
Updated 2022-09-02
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
›
⌄
-- Show the distribution of swap sizes in both $RUNE and USD, both for all pools as well as broken down by pool.
-- select distinct pool_name from flipside_prod_db.thorchain.swaps
select
-- split_part(pool_name, '-', 1) as spool_name,
case when from_amount_usd < 10 then 'size < 10 USD'
when from_amount_usd < 100 then 'size < 100 USD'
when from_amount_usd < 1000 then 'size < 1k USD'
when from_amount_usd < 10000 then 'size < 10k USD'
when from_amount_usd < 100000 then 'size < 100k USD'
else 'size > 100k USD' end as type,
case when type = 'size < 10 USD' then '5.size < 10 USD'
when type = 'size < 100 USD' then '4.size < 100 USD'
when type = 'size < 1k USD' then '2.size < 1k USD'
when type = 'size < 10k USD' then '1.size < 10k USD'
when type = 'size < 100k USD' then '3.size < 100k USD'
else '6.size > 100k USD' end as numberings,
count(1) as total
from flipside_prod_db.thorchain.swaps group by 1,2 order by numberings
Run a query to Download Data