FatemeTheLadyftx8
Updated 2022-11-19
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
›
⌄
-- SQL credit: https://app.flipsidecrypto.com/velocity/queries/aeba56dd-fb52-4a6d-b6f0-145ff5a9180b
with ftxtable as (
select *
from ethereum.core.dim_labels
where label ilike '%ftx%' or address_name ilike '%ftx%' )
--,
-- final as(
select
initcap (label) as Destination,
count (distinct tx_hash) as TX_Count,
sum (amount_usd) as Outflow_Volume
from ethereum.core.ez_token_transfers t1 join ethereum.core.dim_labels t2 on t1.to_address = t2.address
where from_address in (select distinct address from ftxtable)
and to_address not in (select distinct address from ftxtable)
and block_timestamp BETWEEN '2022-11-12' and '2022-11-18'
group by 1
union ALL
select
initcap (label) as Destination,
count (distinct tx_hash) as TX_Count,
sum (amount_usd) as Outflow_Volume
from ethereum.core.ez_eth_transfers t1 join ethereum.core.dim_labels t2 on t1.eth_to_address = t2.address
where eth_from_address in (select distinct address from ftxtable)
and Eth_to_address not in (select distinct address from ftxtable)
and block_timestamp BETWEEN '2022-11-12' and '2022-11-18'
group by 1
-- )
--select Destination, sum(Outflow_Volume) as Outflow_Volume from final where Outflow_Volume is not null
-- group by 1
-- order by 2 desc
-- limit 9
Run a query to Download Data