MLDZMNaal1
Updated 2022-11-08
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
›
⌄
with tb1 as(SELECT
*
from ethereum.core.dim_labels
where label ilike '%alameda%'
or label ilike 'ftx%'
)
select
'Inflow to Alameda or FTX' as actions,
SYMBOL,
count(distinct tx_hash) as no_transfer,
count(distinct from_ADDRESS) as no_sender,
sum(AMOUNT_USD) as total_volume,
avg(AMOUNT_USD) as avg_volume
from ethereum.core.ez_token_transfers
where SYMBOL in ('DAI','USDC','USDT','BUSD','TUSD')
and to_ADDRESS in (select ADDRESS from tb1)
and from_address not in (select ADDRESS from tb1)
and BLOCK_TIMESTAMP>='2022-10-01'
group by 1,2
union all
select
'Outflow from Alameda or FTX' as actions,
SYMBOL,
count(distinct tx_hash) as no_transfer,
count(distinct to_ADDRESS) as no_sender,
sum(AMOUNT_USD) as total_volume,
avg(AMOUNT_USD) as avg_volume
from ethereum.core.ez_token_transfers
where SYMBOL in ('DAI','USDC','USDT','BUSD','TUSD')
and from_ADDRESS in (select ADDRESS from tb1)
and to_address not in (select ADDRESS from tb1)
and BLOCK_TIMESTAMP>='2022-10-01'
group by 1,2
Run a query to Download Data