alirsAiling Alameda-01
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
35
36
›
⌄
with ETH as(select
hour::date as eth_date,
avg(price) as ETH_Price
FROM ethereum.core.fact_hourly_token_prices
where symbol = 'WETH'
and eth_date >= '2022-10-01'
GROUP by 1
ORDER by 1
),
FTT as (
select
hour::date as ftt_date,
avg(price) as FTT_Price
FROM ethereum.core.fact_hourly_token_prices
where symbol = 'FTX Token'
and ftt_date >= '2022-10-01'
GROUP by 1
ORDER by 1),
sol as (
select hour::date as sol_date,
avg(price) as sol_price
from ethereum.token_prices_hourly
where token_address = lower ('0xD31a59c85aE9D8edEFeC411D448f90841571b89c')
and sol_date >= '2022-10-01'
group by 1
order by 1
)
SELECT eth.eth_date, case when eth.eth_date>='2022-11-02' then 'After Report about Alameda Research Insolvent'
else 'Before Report about Alameda Research Insolvent' end as period,
eth_price,FTT_price,Sol_price
FROM
eth join ftt on eth.eth_date=ftt.ftt_DATE
join sol on ftt.ftt_date=sol.sol_date
where eth.eth_date >= '2022-10-01'
order by 1
Run a query to Download Data