boomer77asadex2
Updated 2022-03-29
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
with newtable as (select count (distinct tx_group_id) as TxCount, swapper as Swapper from algorand.swaps where swap_to_amount > 0 and block_timestamp >= '2022-01-01' group by 2)
select
case
when TxCount = 1 then 'Swapped 1 time'
when TxCount = 2 then 'Swapped 2 time'
when TxCount = 3 then 'Swapped 3 time'
when TxCount = 4 then 'Swapped 4 time'
when TxCount = 5 then 'Swapped 5 time'
when TxCount between 6 and 50 then 'Swapped to 6-50 time'
when TxCount between 51 and 250 then 'Swapped to 50-250 time'
when TxCount between 251 and 1000 then 'Swapped to 250-1000 time '
when TxCount >= 1001 then 'Swapped to 1001 time or more'
end as Number_of_swap_made , count (swapper)
from newtable
group by number_of_swap_made
order by 2 desc
Run a query to Download Data