MLDZMNeth4
Updated 2023-04-29
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 deposit as (select
date_trunc('{{Time_basis}}', BLOCK_TIMESTAMP) as date,
count(distinct tx_hash) as no_txn,
count(distinct FROM_ADDRESS) as no_users,
sum(AMOUNT_USD) as deposit_usd,
avg(AMOUNT_USD) as average_depsoit
from ethereum.core.ez_token_transfers
where TO_ADDRESS= lower('0xef8801eaf234ff82801821ffe2d78d60a0237f97')
and BLOCK_TIMESTAMP>=current_date-{{Period}}
group by 1
),
withdraw as (select
date_trunc('{{Time_basis}}', BLOCK_TIMESTAMP) as date,
count(distinct tx_hash) as no_txn1,
count(distinct TO_ADDRESS) as no_users1,
sum(AMOUNT_USD) as withdraw_usd,
avg(AMOUNT_USD) as average_withdraw
from ethereum.core.ez_token_transfers
where FROM_ADDRESS= lower('0xef8801eaf234ff82801821ffe2d78d60a0237f97')
and BLOCK_TIMESTAMP>=current_date-{{Period}}
group by 1
)
select
a.date as date,
deposit_usd,
withdraw_usd,
deposit_usd-withdraw_usd as net_deposit_usd,
average_depsoit,
average_withdraw,
Run a query to Download Data