kasadeghUntitled Query
Updated 2022-10-16
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
›
⌄
with sol_defi_tx_stats as (
select
block_timestamp::date as day,
count(distinct tx_id) as tx_count
from solana.fact_events
where
program_id in (select ADDRESS from solana.core.dim_labels where LABEL ='raydium')
and day >= '2022-10-01' and day<'2022-10-16'
group by 1
order by 1
)
select day,
case
when day = '2022-10-11' then 'The hack'
when day < '2022-10-11' then 'Before the hack'
when day > '2022-10-11' then 'After the hack'
end period,
tx_count,
avg(tx_count) over (order by day ROWS BETWEEN 3 PRECEDING AND CURRENT ROW) as "3Day_MA_tx_count"
from sol_defi_tx_stats
Run a query to Download Data