Sbhn_NP2023-09-13 12:20 PM
Updated 2023-12-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
›
⌄
with base as (select address
from avalanche.core.dim_labels
where project_name ilike '%benqi%'),
new_users as (
select origin_from_address ,
min(block_timestamp::date) as min_date
from avalanche.core.ez_decoded_event_logs
where origin_to_address in (select address from base)
group by 1
),
unique_users as (
select origin_from_address,
block_timestamp
from avalanche.core.ez_decoded_event_logs
where origin_to_address in (select address from base)
)
select 'New Users' as type,
date_trunc('day',min_date) as date,
count(DISTINCT origin_from_address) as users
from new_users
where date >= '2023-08-01'
group by 1,2
union all
select 'Unique Users' as type,
date_trunc('day',block_timestamp) as date,
count(DISTINCT origin_from_address) as users
from unique_users
where date >= '2023-08-01'
group by 1,2
Run a query to Download Data