Cloud9QL can forecast and predict future data points for any dataset, based on its historical values.
To predict a single point in the future:
select PREDICT(<field to predict>, <date field>, <start date for prediction>[, <prediction model>])
To predict multiple data points in the future:
select PREDICT(<Field to Predict>, <Date Field>, <Start Date for Prediction>,
<Prediction Frequency>, <Prediction Data Points>[, <prediction model>])
To predict multiple data points in the future based on secondary dimension(s) (ie: grouping(s)):
select PREDICT(<Field to Predict>, <Date Field>, <Start Date for Prediction>,
<Prediction Frequency>, <Prediction Data Points>[, <prediction model>])
group by <Dimension 1>, ..., <Dimension N>
PREDICT loads the historical data points, determines the optimum prediction model, and returns the predicted future data point(s).
Parameters:
<prediction frequency>: the spacing between predicted points, in the format<Number><TimeUnit>. For example, 1d means daily and 2m means every 2 months.<prediction model>: optional. By default the optimum model is selected automatically. To force a specific model, use one of the following (case-sensitive): Regression, PolynomialRegression, MultipleLinearRegression.
Example:
select predict(Count, Date, 07/10/2015, 1d, 5)
Using input data:
Date, Count
07/01/2015, 1
07/01/2015, 2
07/02/2015, 4
07/04/2015, 8
07/07/2015, 14