boomer77Price Drop Percentage
Updated 2022-04-13
99
1
2
3
4
5
6
7
8
9
10
›
⌄
with raw as (select date_trunc('day', block_timestamp) as dt, avg(price_usd) as LUNA_price, round(((LUNA_price - lag(LUNA_price) OVER (ORDER BY dt asc))/LUNA_price)*100,2) as percentage_drop
from terra.oracle_prices
where symbol = 'LUNA' and year(block_timestamp) in ('2021', '2022')
group by 1)
select dt, luna_price, lag(LUNA_price) OVER (ORDER BY dt asc) as luna_price_before, percentage_drop
from raw
where percentage_drop < 0
order by 4 asc
limit 10
Run a query to Download Data