0-MIDDaily Liquidity Flow on Solana Defi by Defi Projecs
Updated 2022-11-22
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 task1 as (
with act1 as (
with tab1 as (
select ADDRESS,LABEL
from solana.core.dim_labels
where LABEL_TYPE='defi' or LABEL_TYPE='dex'
union all
select 'srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX'as address
,'openbook'as label
),
tab2 as (
select BLOCK_TIMESTAMP::date as date
,PROGRAM_ID
, TX_ID
, INSTRUCTION:accounts[1] as users
from solana.core.fact_events
where SUCCEEDED='TRUE'
group by 1,2,3,4)
select date
,LABEL
,TX_ID
,case
when date>='2022-11-07' then 'After Ftx Chaos'
else 'Before Ftx Chaos' end as chaos_time
from tab1
left join tab2
on tab1.ADDRESS=tab2.PROGRAM_ID
where chaos_time is not null
and date>=current_date-27
group by 1,2,3),
act2 as (
select TX_ID,AMOUNT,MINT
from solana.core.fact_transfers)
select date
,LABEL
,chaos_time
Run a query to Download Data