Moeavax dau 13
Updated 2023-10-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
26
27
28
29
30
31
32
33
34
35
36
›
⌄
WITH daus as (
SELECT
distinct proposer as users,
trunc(block_timestamp, 'week') as weeks,
count(distinct trunc(block_timestamp, 'day')) as active_days
from
flow.core.fact_transactions
group by
1,
2
having
active_days >= 4
)
select
case
when PROPOSER in (select users from daus) then 'DAU'
else 'other'
end as type,
count(distinct e.tx_id) as txns,
count(distinct PROPOSER) as users,
sum (fee_usd) as total_fee_usd,
total_fee_usd/txns as fee_per_txn,
total_fee_usd/users as fee_per_user
from flow.core.fact_transactions e
join (
select
TX_ID,
event_data:amount * avg(close) as fee_usd
from
flow.core.fact_events
join flow.core.fact_hourly_prices on block_timestamp::Date = RECORDED_HOUR::date
where
event_type = 'FeesDeducted'
Run a query to Download Data