MLDZMNMBC2
Updated 2023-01-05
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
›
⌄
with tb1 as (select
TX_TO as user1,
sum(amount) as total_recieved
from solana.core.fact_transfers
where MINT = 'DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263'
group by 1),
tb2 as (select
TX_FROM as user2,
sum(amount) as total_sent
from solana.core.fact_transfers
where MINT = 'DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263'
group by 1)
select
distinct user1 as users,
total_recieved - total_sent as net_flow,
row_number() over (order by net_flow desc) as rank1
from tb1 s left join tb2 b on s.user1 = b.user2
where total_recieved>total_sent
order by 2 desc limit 20
Run a query to Download Data