Moeavax dau 0
Updated 2024-12-31Copy 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 raw_tb as (
select
BLOCK_TIMESTAMP,AMOUNT_USD ,TX_HASH ,TRADER
from arbitrum.vertex.ez_perp_trades
where is_taker = TRUE
union all
select
BLOCK_TIMESTAMP,AMOUNT_USD ,TX_HASH ,TRADER
from arbitrum.vertex.ez_spot_trades
where is_taker = TRUE
)
,
daus as (
SELECT distinct
TRADER as users,
trunc(block_timestamp, 'week') as weeks,
count(distinct trunc(block_timestamp, 'day')) as active_days
from
raw_tb
group by
1,
2
having
active_days >= 4
),
total_daus as (
select
count(distinct users) as users
from
daus
),
total_users as (
select
count(distinct TRADER) as users
from
QueryRunArchived: QueryRun has been archived