amelia-leeUntitled Query
Updated 2022-09-13
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
›
⌄
select date_trunc('day',HOUR) as daily,
avg(PRICE) as Price,
case
when TOKEN_ADDRESS = '0xae78736cd615f374d3085123a210448e74fc6393' then 'rETH' when TOKEN_ADDRESS = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' then 'ETH'
end as Type
from ethereum.core.fact_hourly_token_prices
where TOKEN_ADDRESS in (
'0xae78736cd615f374d3085123a210448e74fc6393' ,'0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
)
and daily >= CURRENT_DATE - interval '1 Year'
group by daily,Type
Run a query to Download Data