Query editor
-- calculate log return of vvv and sd of this log return-- need: price charts of VVV for past 180 days-- vvv contract address:0xacfE6019Ed1A7Dc6f7B508C02d1b04ec88cC21bfwith daily_prices as (-- get daily processelect timestamp as date, symbol, pricefrom prices.daywhere contract_address = 0xacfE6019Ed1A7Dc6f7B508C02d1b04ec88cC21bfand timestamp > now() - interval '180' day), returns_calc as ( -- calculate daily returnsselect date, price, symbol-- , lag(price, 1) over (order by date) as prv_price, ln(price/ lag(price,1) over (order by date)) as log_returnfrom daily_prices)select * from returns_calc order by date desc