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_libsvm_regressor(price,features(to_unixtime(day)),'kernel=poly,degree=3' -- https://trino.io/docs/current/release/release-0.70.html#machine-learning-functions) 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(dt)),model) as predicted_pricefrom projected_dates pcross join classifier