Moeusdt top holeders
Updated 2022-06-17Copy Reference Fork
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
33
34
35
36
›
⌄
WITH ins as (
SELECT
distinct swapper,
sum(swap_to_amount) as volume_in,
count(distinct tx_id) as n_swaps_in,
avg(swap_to_amount) as avg_volume
from solana.fact_swaps x
where
swap_to_mint in ('Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB')
and swap_to_amount >0 and swap_to_amount is not null
group by 1
),
outs as (
SELECT
distinct swapper,
sum(swap_from_amount) as volume_out,
count(distinct tx_id) as n_swaps_out,
avg(swap_from_amount) as avg_volume
from solana.fact_swaps x
where
swap_from_mint in ('Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB')
and swap_from_amount >0 and swap_from_amount is not null
group by 1
),
fin as (SELECT
x.swapper as swapper,
volume_in-volume_out as net_volume,
n_swaps_in+n_swaps_out as total_swaps,
(x.avg_volume+y.avg_volume)/2 as avg_volume
from ins x, outs y where x.swapper=y.swapper
HAVING net_volume>0.1
order by 2 desc limit 100
Run a query to Download Data