alirsnyk-03
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
›
⌄
WITH FTX
AS (
SELECT address_name
,label
,address
FROM ethereum.core.dim_labels
WHERE address_name ilike '%ftx%'
OR label ilike '%ftx%'
OR label ilike '%alameda research%'
)
select initcap (label) as Destination,
count (distinct tx_hash) as TX_Count,
sum (amount_usd) as Outflow_Volume
from ethereum.core.ez_token_transfers trans join ethereum.core.dim_labels lab on trans.to_address = lab.address
where from_address in (select distinct address from ftx)
and to_address not in (select distinct address from ftx)
and block_timestamp > CURRENT_DATE - 7
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 trans join ethereum.core.dim_labels lab on trans.eth_to_address = lab.address
where eth_from_address in (select distinct address from ftx)
and Eth_to_address not in (select distinct address from ftx)
and block_timestamp > CURRENT_DATE - 7
group by 1
order by 2 desc
limit 10
Run a query to Download Data