justabfjNormalized Distribution of Swap Size in USD By Pool
Updated 2022-09-05Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
›
⌄
with thorchain_swap_distr_by_pool as (
select split_part(pool_name, '-', 1) as spool_name,
(case
when from_amount_usd > 0 and from_amount_usd <= 10 then '0- Swap Size 0-10 USD'
when from_amount_usd > 10 and from_amount_usd <= 100 then '1- Swap Size 10-100 USD'
when from_amount_usd > 100 and from_amount_usd <= 1000 then '2- Swap Size 100-1k USD'
when from_amount_usd > 1000 and from_amount_usd <= 10000 then '3- Swap Size 1k-10k USD'
when from_amount_usd > 10000 and from_amount_usd <= 100000 then '4- Swap Size 10k-100k USD'
when from_amount_usd > 100000 then '5- Swap Size 100k+ USD'
end) as swap_category,
count(*) as swap_count
from thorchain.swaps
where from_amount_usd is not null
and from_amount_usd > 0
group by spool_name, swap_category
)
select *
from thorchain_swap_distr_by_pool
order by swap_category
Run a query to Download Data