Query editor
with price_data as (selectdate_trunc('day', minute) as day,avg(price) as pricefrom prices.usdwhere symbol = 'BTC'group by 1order by day),classifier as (selectlearn_regressor(price,-- features(to_unixtime(day)) -- linear-- features(to_unixtime(day), pow(to_unixtime(day),2)) -- polynomialfeatures(ln(to_unixtime(day))) -- logreg) as modelfrom price_data),projected_dates as (SELECTdtFROM UNNEST(SEQUENCE(CAST(CURRENT_TIMESTAMP AS DATE),CAST(CURRENT_TIMESTAMP + INTERVAL '1' year AS DATE))) as t(dt))selectto_unixtime(dt),regress(-- features(to_unixtime(day)) -- linear-- features(to_unixtime(dt), pow(to_unixtime(dt),2)),features(ln(to_unixtime(dt))),model) as predicted_pricefrom projected_dates pcross join classifier