nits2-Binance Bonanza Change in % Price and Volume
Updated 2022-11-02
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
›
⌄
with day1 as
(SELECT date(recorded_at) as day, avg(price) as avg_price, avg(volume_24h) as avg_vol
from osmosis.core.dim_prices
where symbol = 'OSMO' and volume_24h < pow(10,10)
GROUP by 1
order by 1 desc
limit 60 ),
day2 as
(SELECT date(recorded_at) as day_, avg(price) as avg_price2, avg(volume_24h) as avg_vol2
from osmosis.core.dim_prices
where symbol = 'OSMO' and volume_24h < pow(10,10)
GROUP by 1
order by 1 desc
limit 60 )
SELECT *, (avg_price-avg_price2)/avg_price2*100 as percent_change_price,
(avg_vol-avg_vol2)/avg_vol2*100 as percent_change_vol
from day1
inner join day2
on day = day_+1
Run a query to Download Data