roketk7
Updated 2022-11-17
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 ftxt as (
select * from ethereum.core.dim_labels where address_name ilike '%ftx%' or label ilike '%ftx%'),
maintable as (
select block_timestamp,
tx_hash,
eth_to_address as receiver,
'ETH' as symbol,
amount_usd as volume
from ethereum.core.ez_eth_transfers
where eth_from_address in (select address from ftxt)
and eth_to_address not in (select address from ftxt)
and block_timestamp >= CURRENT_DATE - 14
and volume > 0
union ALL
select block_timestamp,
tx_hash,
to_address as receiver,
symbol,
amount_usd as volume
from ethereum.core.ez_token_transfers
where from_address in (select address from ftxt)
and to_address not in (select address from ftxt)
and block_timestamp >= CURRENT_DATE - 14
and volume > 0
and contract_address !='0xc229c69eb3bb51828d0caa3509a05a51083898dd')
select block_timestamp::date as date,
case when date >= '2022-11-07' then 'After Collapse'
else 'Before Collapse' end as timespan,
count (distinct tx_hash) as TX_Count,
count (distinct receiver) as Users_Count,
sum (volume) as Total_Volume,
avg (volume) as Average_Volume
Run a query to Download Data