RayyykOpen Analytics Bounty: Arbitrum (August 6) 1
Updated 2022-08-10Copy 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 arbi_old as (select distinct(from_address) as arbi_old_users
from arbitrum.core.fact_transactions
where block_timestamp <= {{time_period}}),
opti_old as (select distinct(from_address) as opti_old_users
from optimism.core.fact_transactions
where block_timestamp <= {{time_period}}),
avax_old as (select distinct(from_address) as avax_old_users
from avalanche.core.fact_transactions
where block_timestamp <= {{time_period}})
select date_trunc({{data}}, block_timestamp) as day,
'Arbitrum',
count(distinct(from_address)) as new_user_count,
count(distinct(tx_hash)) as tx_count
from arbitrum.core.fact_transactions
where from_address not in (select arbi_old_users from arbi_old)
group by 1
union
select date_trunc({{data}}, block_timestamp) as day,
'Optimism',
count(distinct(from_address)),
count(distinct(tx_hash))
from optimism.core.fact_transactions
where from_address not in (select opti_old_users from opti_old)
group by 1
union
select date_trunc({{data}}, block_timestamp) as day,
'Avalanche',
count(distinct(from_address)),
count(distinct(tx_hash))
from avalanche.core.fact_transactions
where from_address not in (select avax_old_users from avax_old)
group by 1
order by 1
Run a query to Download Data