Was this page helpful?
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All


Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

Performs an empty prediction join, returning the most probable value or values for the specified columns. Only the content from the mining model is used to create the prediction.

SELECT <expression list> [TOP <n>] FROM <model> 
[WHERE <condition list>] 
[ORDER BY <expression> [DESC|ASC]]

expression list

A comma-separated list of expressions, or of predict or predict only columns.


Optional. An integer that specifies how many rows to return.


A model identifier.

condition list

Optional. Conditions to restrict the values that are returned from the column list.


Optional. An expression that returns a scalar value.

The columns in the expression list must be defined as predict or predict only, or related to a predictable column.

The following example performs an empty prediction join on the Bike Buyer column, returning the most likely state in the TM Naive Bayes mining model.

SELECT ([Bike Buyer]) FROM [TM_Naive_Bayes]

The following example performs a prediction on the Amount column in the Forecasting model, returning the next four time steps. The Model Region column combines bike models and regions into a single identifier. The query uses the PredictTimeSeries (DMX) function to perform the prediction.

SELECT [Model Region], PredictTimeSeries(Amount, 4) 
FROM Forecasting
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft