rajsUnique Wallets depositing ETH to Zksync by Day
Updated 2022-06-17Copy Reference Fork
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 new_wallets as
(
SELECT
date_joined as date,
count(wallet_address) as new_wallets
FROM
(
SELECT
eth_from_address as wallet_address,
min(date_trunc('day', block_timestamp)) as date_joined
from ethereum.core.ez_eth_transfers
where origin_to_address = '0xabea9132b05a70803a4e85094fd0e1800777fbef'
and eth_to_address = '0xabea9132b05a70803a4e85094fd0e1800777fbef'
and block_timestamp >= CURRENT_DATE - interval '60 days'
group by 1
)
group by 1
)
,
total_wallets as
(
SELECT
date_trunc('day', block_timestamp) as date,
count(distinct eth_from_address) as total_wallets
from ethereum.core.ez_eth_transfers
where origin_to_address = '0xabea9132b05a70803a4e85094fd0e1800777fbef'
and eth_to_address = '0xabea9132b05a70803a4e85094fd0e1800777fbef'
and block_timestamp >= CURRENT_DATE - interval '60 days'
group by 1
)
SELECT
t.*,
avg(total_wallets) over (order by t.date rows between 7 preceding and 1 preceding) as "previous_7_day_avg",
new_wallets,
Run a query to Download Data