CartanGroupAptos Base - [chain] active & new accounts
Updated 2024-07-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
account_txs as (
select
block_timestamp
, sender as address
, 'Active Accounts' as category
from aptos.core.fact_transactions
-- where block_timestamp ::date > current_date() - interval '180 days'
union all
select
block_timestamp
, account_address as address
, 'New Accounts' as category
from aptos.core.fact_events
where success
and event_address = '0x1'
and event_module = 'account'
and event_resource = 'CoinRegisterEvent'
and event_data :type_info :module_name = '0x6170746f735f636f696e' -- aptos_coin
and sequence_number = 0
-- and block_timestamp ::date > current_date() - interval '180 days'
)
SELECT
date,
category,
avg(accounts) over (partition by category
order by date rows between 7 preceding and current row) as users
QueryRunArchived: QueryRun has been archived