messariklaytn_daily_addresses
Updated 2024-10-15
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
-- forked from Eman-Raz / klaytn users @ https://flipsidecrypto.xyz/Eman-Raz/q/TymnkArLCxcK/klaytn-users
with tab1 as (select date_trunc('day',block_timestamp) as "Date", count(distinct from_address) as "Total Users"
from kaia.core.fact_transactions
where tx_succeeded='true'
group by 1),
tab2 as (with tab10 as (select from_address, min(block_timestamp::date) as first_tx
from kaia.core.fact_transactions
where tx_succeeded='true'
group by 1)
select date_trunc('day',first_tx) as "Date", count(distinct from_address) as "New Users"
from tab10
group by 1)
select tab1."Date" as "Date", "Total Users" as "total_address", "New Users" as "new_address", "Total Users"-"New Users" as "active_address"
from tab1 left join tab2 on tab1."Date"=tab2."Date"
where tab1."Date" >= '2023-01-01'
QueryRunArchived: QueryRun has been archived