Alexayinflow outflow eth
Updated 2022-11-17Copy 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 ftxtable as ( select *
from ethereum.core.dim_labels
where label ilike '%ftx%' or address_name ilike '%ftx%'),
Inflowt as ( select block_timestamp::date as Inflow_Date, symbol as Symbol_IN, sum (amount_usd) as Inflow_Volume
from ethereum.core.ez_token_transfers
where to_address in (select distinct address from ftxtable)
and from_address not in (select distinct address from ftxtable)
and block_timestamp > '2022-11-01'
group by 1,2
union ALL
select block_timestamp::date as Inflow_Date, 'ETH' as symbol_in, sum (amount_usd) as Inflow_Volume
from ethereum.core.ez_eth_transfers
where eth_to_address in (select distinct address from ftxtable)
and eth_from_address not in (select distinct address from ftxtable)
and block_timestamp > '2022-11-01'
group by 1,2),
Outflowt as ( select block_timestamp::date as Outflow_Date, symbol as Symbol_Out, sum (amount_usd) as Outflow_Volume
from ethereum.core.ez_token_transfers
where from_address in (select distinct address from ftxtable)
and to_address not in (select distinct address from ftxtable)
and block_timestamp > '2022-11-01'
group by 1,2
union ALL
select block_timestamp::date as Outflow_Date, 'ETH' as sybmol_out, sum (amount_usd) as Outflow_Volume
from ethereum.core.ez_eth_transfers
where eth_from_address in (select distinct address from ftxtable)
and Eth_to_address not in (select distinct address from ftxtable)
and block_timestamp > '2022-11-01'
group by 1,2)
Run a query to Download Data