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

    This isn't really "in SQL" as much as "using a product that has a SQL extension/backend".

  • by andix on 2/22/2022, 8:10:34 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 Simon_O_Rourke on 2/22/2022, 7:33:19 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.