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_hash,
origin_from_address as sender,
to_address as receiver,
amount
from ethereum.core.ez_token_transfers
where contract_address = '0x6c3ea9036406852006290770bedfcaba0e23a0e8'
),
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