cybergenlab[DEX Overview] User Growth
Updated 2024-11-16
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
›
⌄
-- forked from [DeFi Overview] User Growth @ https://flipsidecrypto.xyz/studio/queries/ffc8d23d-91c9-4ad9-9d22-db441a417524
--Get historical DeFi project user growth
with monthly_new_users as (
select
date_trunc('month', block_timestamp) as time,
label_type as category,
count(distinct from_address) as new_users,
from ethereum.core.fact_transactions as transactions
left join ethereum.core.dim_labels labels on transactions.to_address = labels.address
where block_timestamp < date_trunc('month',current_date())
--block_timestamp >= dateadd(year, -3, date_trunc('month',current_date()))
and nonce = 0
and category in ('dex')
and status = 'SUCCESS'
group by 1,2
)
select
time,
new_users,
sum(new_users) over (order by time) as users
from monthly_new_users
group by 1,2
order by 1 desc
QueryRunArchived: QueryRun has been archived