Delamir-60142023-01-22 10:33 PM
Updated 2023-01-25
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_User as (
select
'November 2022' as timespan,
block_timestamp::date as date,
count(distinct from_address) as users,
count(distinct tx_hash)as TXs
from ethereum.core.fact_transactions
where date >= '2022-11-01' and date < '2022-12-01'
and to_address = '0x92d6c1e31e14520e676a687f0a93788b716beff5'
group by 1,2
UNION
select
'December 2022' as timespan,
block_timestamp::date as date,
count(distinct from_address) as users,
count(distinct tx_hash)as TXs
from ethereum.core.fact_transactions
where date >= '2022-12-01' and date < '2023-01-01'
and to_address = '0x92d6c1e31e14520e676a687f0a93788b716beff5'
group by 1,2
union
select
'January 2023' as timespan,
block_timestamp::date as date,
count(distinct from_address) as users,
count(distinct tx_hash) as TXs
from ethereum.core.fact_transactions
where date >= '2023-01-01' and date <= CURRENT_DATE
and to_address = '0x92d6c1e31e14520e676a687f0a93788b716beff5'
group by 1,2
)
select
timespan,
sum (users) as Total_users,
sum (TXs) as Total_TXs
from New_User
Run a query to Download Data