Azinos12 . bridge in by blockchains
Updated 2022-11-24Copy Reference Fork
999
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 price as
(
(select ID as tokens , avg(CLOSE) as price,date_trunc('day',RECORDED_HOUR) as date
from
crosschain.core.fact_hourly_prices
where
ID in ('frax','wei','wmatic','link','binancecoin','bitcoin','wrapped-avax','maker','rizon','polkadot')
and
date>CURRENT_DATE-150
group by 1,3)
union ALL
(select lower(SYMBOL) as tokens , avg(PRICE) as price, date_trunc('day',RECORDED_AT) as date from
osmosis.core.dim_prices
where
date>CURRENT_DATE-150
group by 1,3
)),
axl as
(select
case when
SUBSTR(CURRENCY, 0, 1) = 'u' then SUBSTR(CURRENCY, 2, len(CURRENCY)-1)
when CURRENCY='cusdc' then 'usdc'
when CURRENCY='wavax-wei' then 'wrapped-avax'
when CURRENCY='wftm-wei' then 'ftm'
when CURRENCY='wbtc-satoshi' then 'bitcoin'
when CURRENCY='wbnb-wei' then 'binancecoin'
when CURRENCY='dot-planck' then 'polkadot'
when CURRENCY='uni-wei' then 'uni'
when CURRENCY in('wmatic-wei','cmatic') then 'wmatic'
Run a query to Download Data