Afonso_Diaztotal
Updated 2024-10-27
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
main as (
select
block_timestamp,
tx_id,
tx_from as sender,
tx_to as receiver,
amount
from solana.core.fact_transfers
where mint = '2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo'
),
deposit as (
select
receiver as user,
sum(amount) as increase_volume
from main
group by 1
),
withdraw as (
select
sender as user,
sum(amount) as decrease_volume
from main
group by 1
),
balances as (
select
user,
increase_volume - nvl(decrease_volume, 0) as volume_usd
from deposit
left join withdraw
using(user)
QueryRunArchived: QueryRun has been archived