This example uses an Orders table (output by the TimeSeriesOrders function) instead of a PDQ syntax element. The Orders table has two time series.
Input
The InputTable, milk_3, is from ARIMA Example: OrdersTable, PartitionColumns, No Seasonality.
SQL Call
SELECT * FROM VARMAX ( ON milk_3 AS InputTable PARTITION BY id_partition ORDER BY period ON TimeSeriesOrders( ON milk_3 AS InputTable PARTITION BY id_partition ORDER BY period ASC USING TimestampColumns ('period') ResponseColumn ('milkpound') PartitionColumns ('id_partition') ) AS orders PARTITION BY id_partition USING TargetColumns ('milkpound') PartitionColumns ('id_partition') MaxIterNum (1000) FitMethod ('ML') ) AS dt ;
Output
id_partition coef coef_value ------------ ------------------ ---------------------------------------------- 1 coef 1, 1, 1, 0, 0, 0, 0 2 coef 0, 1, 2, 0, 0, 0, 0 1 ar_params [[0.34403170023658103]] 2 ar_params NULL 1 ma_params [[0.5821427351731738]] 2 ma_params [[0.8304444685178987]],[[0.39987632773261356]] 1 exogenous_params NULL 2 exogenous_params NULL 1 seasonal_ar_params NULL 2 seasonal_ar_params NULL 1 seasonal_ma_params NULL 2 seasonal_ma_params NULL 1 period 0 2 period 0 1 lag 0 2 lag 0 1 sigma [[591.6645419709592]] 2 sigma [[643.2306748042672]] 1 aic 6.468046205178683 2 aic 6.503886585224706 1 bic 6.546775890357835 2 bic 6.553846002691284 1 iterations 20 2 iterations 23 1 converged true 2 converged true
Download a zip file of all examples and a SQL script file that creates their input tables from the attachment in the left sidebar.