FatemeTheLadyftx6
Updated 2022-11-19Copy Reference Fork
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 osmosis_priceTb as (
select
date_trunc('day',recorded_at) as p_date,
symbol,
avg(price) as price_usd
from osmosis.core.dim_prices
WHERE p_date > '2022-11-01'
group by 1,2
)
, priceTb as (
SELECT
hour::date as p_date,
symbol,
avg(price) as price_usd
FROM ethereum.core.fact_hourly_token_prices
WHERE p_date > '2022-11-01'
GROUP by 1,2
)
, ftxtable as (
select *
from ethereum.core.dim_labels
where label ilike '%ftx%' or address_name ilike '%ftx%'
),
FTX_to_Eth as (
select
block_timestamp,
ORIGIN_FROM_ADDRESS,
to_address,
TX_HASH,
symbol as Symbol_Out,
amount_usd
from ethereum.core.ez_token_transfers
where from_address in (select distinct address from ftxtable)
and to_address not in (select distinct address from ftxtable)
and block_timestamp::date BETWEEN '2022-11-05' and '2022-11-18'
-- group by 1,2,3
Run a query to Download Data