KaskoazulJoined Swaps-wallets
Updated 2022-04-19
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
›
⌄
WITH ASSETS AS (
select swapper as wallet,
count(distinct swap_from_asset_id) as number_of_assets
from algorand.swaps
where block_timestamp >= '2022-01-01'
and swap_from_amount >= 0
group by wallet--, type
order by number_of_assets desc
),
SWAPS AS (
select swapper as wallet,
count(distinct tx_group_id) as swaps,
PERCENT_RANK() OVER(ORDER BY swaps desc) AS Percent_Rank
from algorand.swaps
where block_timestamp >= '2022-01-01'
and swap_from_amount >= 0
group by wallet--, type
order by swaps desc
)
select a.wallet,
s.swaps,
a.number_of_assets,
s.swaps/a.number_of_assets as swaps_per_asset
from ASSETS a
inner join SWAPS s
on a.wallet = s.wallet
where swaps > 1000
order by swaps desc
Run a query to Download Data