SalehNew Users Based on First Activity-Aptos
Updated 2024-12-14
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 lst_all as (
select
block_timestamp::date as date
,tx_hash
,sender as wallet
,event_address
,iff( INITCAP(LABEL_TYPE)='Token','Defi',INITCAP(LABEL_TYPE)) as Type
,LABEL
,ADDRESS_NAME
,LABEL_SUBTYPE
from aptos.core.fact_events
join aptos.core.dim_labels on address = event_address
join aptos.core.fact_transactions using(tx_hash)
where SUCCESS=true
and tx_type='user_transaction'
)
,lst_new as (
select
sender
,min(block_timestamp)::date as min_date
from aptos.core.fact_transactions
group by 1
)
select
Type
-- ,LABEL
,count(DISTINCT wallet) as Wallets
,count(DISTINCT tx_hash) as TXs
from lst_all
join lst_new on wallet=sender
group by 1
QueryRunArchived: QueryRun has been archived