
In this example, the nested table is returned by calling the Predict function and using the INCLUDE_STATISTICS argument. The first argument to the BottomPercent function is the name of a table column. (SELECT (SELECT 'Women''s Mountain Shorts' as ) AS ) AS t The BottomPercent function takes the results of this query and returns the smallest-valued rows that sum to the specified percentage. For more information, see Create a Singleton Query in the Data Mining Designer. When you select the value from the dropdown list, the required escape character is inserted for you. If you are not sure of the syntax for inserting an escape character, you can use the Prediction Query Builder to create the query. In this example, the value supplied as input contains a single quotation mark, and therefore must be escaped by prefacing it with another single quotation mark. SELECT (SELECT 'Women''s Mountain Shorts' as ) AS ) AS t SELECT Predict (., INCLUDE_STATISTICS, 10) To understand how BottomPercent works, it may be helpful to first execute a prediction query that returns only the nested table. The following example creates a prediction query against the Association model that you built in the Basic Data Mining Tutorial. BottomPercent returns the smallest number of elements possible while still meeting the specified percent value. The rank is based on the evaluated value of the argument for each row, such that the sum of the values is at least the given percentage that is specified by the argument. The BottomPercent function returns the bottom-most rows in increasing order of rank. The name of a nested table column or table-valued expression.Ī column in the nested table, or expression that evaluates to a column.Ī double that indicates the total target percentage. Returns, in order of increasing rank, the bottom-most rows of a table whose cumulative total is at least a specified percentage.
