from Hacker News

Time Series Forecasting in SQL

by aicoding on 2/22/22, 6:19 AM with 8 comments

  • by wfriesen on 2/22/22, 7:20 AM

    This isn't really "in SQL" as much as "using a product that has a SQL extension/backend".
  • by andix on 2/22/22, 8:10 AM

    You can do your own forecasting in SQL with Python or R. Depending which database you use, there will probably be some kind of integration. Postgres has PL/R and PL/Python.
  • by sdepablos on 2/22/22, 7:31 AM

  • by Simon_O_Rourke on 2/22/22, 7:33 AM

    Check out the statistical functions baked into Snowflake SQL. We've got a PL/SQL script that forecasts sales volume with seasonality, using a modified ARIMA approach. We're also turning this approach loose on our own data pipeline to trigger alerts on abnormal row counts.