rokete21
Updated 2022-11-23
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
›
⌄
with cextable as (select * from ethereum.core.dim_labels where label_type ilike 'cex'),
Inflowt as (
select sum (amount) as Inflow_Volume
from ethereum.core.ez_eth_transfers
where eth_to_address in (select distinct address from cextable)
and eth_from_address not in (select distinct address from cextable)
and block_timestamp >= '2022-11-01'),
Outflowt as (
select sum (amount) as Outflow_Volume
from ethereum.core.ez_eth_transfers
where eth_from_address in (select distinct address from cextable)
and eth_to_address not in (select distinct address from cextable)
and block_timestamp >= '2022-11-01')
select inflow_volume as Inflow,
outflow_volume*-1 as Outflow,
inflow_volume - outflow_volume as Net_Flow
from Inflowt t1 join Outflowt t2