adriaparcerisasdau near
Updated 2024-08-20
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
›
⌄
WITH
daus as (
SELECT
distinct tx_signer as users,
trunc(block_timestamp,'week') as weeks,
count(distinct trunc(block_timestamp,'day')) as active_days
from near.core.fact_transactions
group by 1,2
having active_days>=4
),
active_users as (
SELECT
trunc(block_timestamp,'week') as date,
case when tx_signer in (select users from daus) then 'DAU'
else 'No DAU' end as type,
count(distinct tx_signer) as n_users,
count(distinct tx_hash) as txs
from near.core.fact_transactions
group by 1,2
)
select * from active_users
where date>=current_date-interval '{{Months}} MONTHS'
and date<trunc(current_date,'week')
order by 1 asc
QueryRunArchived: QueryRun has been archived