dammyzuksParadigm 1 copy
Updated 2024-08-13
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
›
⌄
select
sum(case when sym = 'ETH' then AMOUNT end) as ETH_amount,
sum(case when sym = 'USDC' then AMOUNT end) as USDC_amount,
sum(case when sym = 'ETH' then usd_amount end) + sum(case when sym = 'USDC' then usd_amount end) as total_amount_usd,
count(distinct users) as user,
count(distinct txs) as tx,
count(distinct BLOCK_TIMESTAMP::date) as days
from(
select
distinct tx_hash as txs,
BLOCK_TIMESTAMP,
'ETH' as sym,
FROM_ADDRESS as users,
AMOUNT as amount,
AMOUNT_USD as usd_amount
from ethereum.core.ez_native_transfers
where TO_ADDRESS = lower('0xdAf1695c41327b61B9b9965Ac6A5843A3198cf07')
--group by 1
UNION
select
distinct tx_hash as txs,
BLOCK_TIMESTAMP,
'USDC' as sym,
FROM_ADDRESS as users,
AMOUNT as amount,
AMOUNT_USD as usd_amount
from ethereum.core.ez_token_transfers
where TO_ADDRESS = lower('0x32a786f22c303dA1B0038fA26773c2dE48209eF8')
and symbol = 'USDC'
--group by 1
)
QueryRunArchived: QueryRun has been archived