cypheroptimism dashboard - daily stats
Updated 2023-05-29
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 first_tx as (select
from_address,
min(block_timestamp) as timestamp
from optimism.core.fact_transactions
group by 1),
daily_new_users as (select
date(date_trunc('day', timestamp)) as date,
count(*) as n_new_users,
sum(n_new_users) over (order by date asc rows between unbounded preceding and current row) as cum_users
from first_tx
group by date),
active_users as (select
date(date_trunc('day', block_timestamp)) as date,
count(distinct (from_address)) as active_users,
count(distinct(tx_hash)) as n_tx,
sum(tx_fee) as fee_eth,
fee_eth/n_tx avg_tx_fee,
n_tx/86400 as avg_tps
from optimism.core.fact_transactions
group by 1),
active_contracts as (select
date(date_trunc('day', block_timestamp)) as date,
count(distinct(contract_address)) as active_contracts
from optimism.core.fact_event_logs
group by date),
first_tx_cont as (select
contract_address,
min(block_timestamp) as timestamp
from optimism.core.fact_event_logs
group by 1
),
Run a query to Download Data