MLDZMNsolcex1 copy
Updated 2023-07-18
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 solcex1 @ https://flipsidecrypto.xyz/edit/queries/278ac264-cd1b-45ed-94a2-3a60feb2a2f8
with tb1 as(SELECT
*
from solana.core.dim_labels
where label_type='cex'
)
select
date_trunc('hour',BLOCK_TIMESTAMP) as hour,
'From network to CEXs' as paths,
count(distinct tx_id) as no_transfer,
count(distinct tx_from) as no_sender,
sum(AMOUNT) as total_volume,
avg(AMOUNT) as avg_volume
from solana.core.fact_transfers
where tx_to in (select ADDRESS from tb1)
and tx_from not in (select ADDRESS from tb1)
and mint = 'NeonTjSjsuo3rexg9o6vHuMXw62f9V7zvmu8M8Zut44'
group by 1
union ALL
select
date_trunc('hour',BLOCK_TIMESTAMP) as hour,
'From CEXs to network' as paths,
count(distinct tx_id) as no_transfer,
count(distinct tx_to) as no_sender,
sum(AMOUNT) as total_volume,
avg(AMOUNT) as avg_volume
from solana.core.fact_transfers
where tx_from in (select ADDRESS from tb1)
and tx_to not in (select ADDRESS from tb1)
and mint = 'NeonTjSjsuo3rexg9o6vHuMXw62f9V7zvmu8M8Zut44'
group by 1
Run a query to Download Data