PS0G1Alameda/FTX FTT transfers to CEX
Updated 2022-11-10
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
›
⌄
--credit 0xHaM☰d
with fttPrice as (
select
hour::date as p_date,
avg(price) as "FTT price($)"
FROM ethereum.core.fact_hourly_token_prices
WHERE symbol in ('FTX Token')
and hour::date >= '2022-10-01'
GROUP by 1
ORDER by 1
)
-- , txTb as (
SELECT
BLOCK_TIMESTAMP::date as date,
label_type,
PROJECT_NAME,
COUNT(DISTINCT tx_hash) as tx_cnt,
COUNT(DISTINCT ORIGIN_FROM_ADDRESS) as user_cnt,
sum(EVENT_INPUTS:value/1e18) as volume,
sum((EVENT_INPUTS:value/1e18)*"FTT price($)") as "volume($)",
sum(tx_cnt) over (partition by PROJECT_NAME order by date) as cum_tx_cnt,
sum(volume) over (partition by PROJECT_NAME order by date) as cum_volume,
sum("volume($)") over (partition by PROJECT_NAME order by date) as "Cum volume($)"
FROM ethereum.core.fact_event_logs a JOIN crosschain.core.address_labels b on a.EVENT_INPUTS:to = b.address
JOIN fttPrice c on a.BLOCK_TIMESTAMP::date = c.p_date
WHERE ORIGIN_TO_ADDRESS = '0x50d1c9771902476076ecfc8b2a83ad6b9355a4c9'
and BLOCK_TIMESTAMP::date >= '2022-10-01'
and EVENT_NAME != 'Approval'
GROUP by 1,2,3
order by 1
-- )
Run a query to Download Data