mlhorca
Updated 2022-07-09Copy 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
›
⌄
with orca_cex as (
select
address,
address_name
from solana.core.dim_labels
where label_type ='cex'),
to_orca as (
select
date_trunc ('day',block_timestamp) as days,
amount,
tx_from
from solana.core.fact_transfers
where tx_from in (select address from orca_cex)
and tx_to not in (select address from orca_cex)
and mint = ('orcaEKTdK7LKz57vaAYr9QeNsVEPfiu6QeMU1kektZE')),
from_orca as (
select
date_trunc ('day',block_timestamp) as days,
amount,
tx_from
from solana.core.fact_transfers
where tx_to in (select address from orca_cex)
and tx_from not in (select address from orca_cex)
and mint = ('orcaEKTdK7LKz57vaAYr9QeNsVEPfiu6QeMU1kektZE'))
select days,
'from orca' as type,
sum(amount) as Volume,
count(*) as TX_Count
from from_orca
group by 1
UNION
select
days,
Run a query to Download Data