nsa2000cefi and defi transactions and users
Updated 2022-10-17Copy Reference Fork
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
›
⌄
select
block_timestamp::date as date,
'Defi Pre Hack' as period,
count(distinct tx_id) as tx_cnt,
count(distinct instruction:accounts[0]) as uniq_users
from solana.core.fact_events inner join solana.core.dim_labels
on program_id = address
where SUCCEEDED='TRUE'
and label_type in('defi')
and block_timestamp::date >='2022-10-01'
and block_timestamp::date < '2022-10-11'
group by 1 , 2
UNION
select
block_timestamp::date as date,
'Defi Post Hack' as period,
count(distinct tx_id) as tx_cnt,
count(distinct instruction:accounts[0]) as uniq_users
from solana.core.fact_events inner join solana.core.dim_labels
on program_id = address
where SUCCEEDED='TRUE'
and label_type in('defi')
and block_timestamp::date >='2022-10-11'
and block_timestamp::date <= CURRENT_DATE - 1
group by 1 , 2
UNION
select
block_timestamp::date as date,
'Cefi Pre Hack' as period,
count(distinct tx_id) as tx_cnt,
count(distinct TX_FROM) as uniq_users
from solana.core.fact_transfers t,solana.core.dim_labels l
Run a query to Download Data