Share via


BottomSum

Returns, in order of increasing rank, the bottom-most rows of a table whose cumulative total is at least a specified value.

Syntax

BottomSum(<table expression>, <rank expression>, <sum>)

Applies To

An expression that returns a table, such as a <table column reference>, or a function that returns a table.

Return Type

<table expression>

Remarks

The BottomSum function returns the bottom-most rows in increasing order of rank. The rank is based on the evaluated value of the <rank expression> argument for each row, such that the sum of the <rank expression> values is at least the given total that is specified by the <sum> argument. BottomSum returns the smallest number of elements possible while still meeting the specified sum value.

See Also

Reference

Data Mining Extensions (DMX) Function Reference
Functions (DMX)
Mapping Functions to Query Types (DMX)

Help and Information

Getting SQL Server 2005 Assistance