0xHaM-dBlast_24h_new_users_actions
Updated 2024-05-04
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
›
⌄
-- forked from Saleh / aptos_24h_new_users_actions @ https://flipsidecrypto.xyz/Saleh/q/OS3wRSpC-72k/aptos_24h_new_users_actions
with lst_all as (
select
block_timestamp::date as date
,tx_hash
,FROM_ADDRESS as wallet
,CONTRACT_ADDRESS
,iff( INITCAP(LABEL_SUBTYPE) ilike 'token%','Defi',INITCAP(LABEL_SUBTYPE)) as Type
,LABEL_TYPE
,PROJECT_NAME
,LABEL_SUBTYPE
from blast.core.ez_decoded_event_logs
join blast.core.dim_labels on CONTRACT_ADDRESS = address
join blast.core.fact_transactions using(tx_hash)
where STATUS='SUCCESS'
)
,lst_new as (
select
FROM_ADDRESS
,min(block_timestamp)::date as min_date
from blast.core.fact_transactions
group by 1
)
,lst_group as (
select
Type
-- ,LABEL
,count(DISTINCT wallet) as Wallets
,count(DISTINCT tx_hash) as TXs
from lst_all
join lst_new on wallet=FROM_ADDRESS
where min_date >= DATEADD(HOUR, -24, CURRENT_TIMESTAMP())
group by 1
order by 1
)
QueryRunArchived: QueryRun has been archived