Difference between revisions of "MINVALUES()"
Yvonne.milne (Talk | contribs) m (1 revision) |
Yvonne.milne (Talk | contribs) |
||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Function to returns the minimum numeric value for a matching series of keys | Function to returns the minimum numeric value for a matching series of keys | ||
− | |||
==Syntax== | ==Syntax== | ||
MINVALUES(<expN> [, <for condition> [, <key expr>]]) | MINVALUES(<expN> [, <for condition> [, <key expr>]]) | ||
− | |||
==See Also== | ==See Also== | ||
− | [[AMAX()]], [[AMIN()]], [[AVERAGE]], [[AVGVALUES()]], [[CNTVALUES()]], [[COUNT]], [[MAX()]], [[MAXVALUES()]], [[MIN | + | [[ALLVALUES()]], [[AMAX()]], [[AMIN()]], [[AVERAGE]], [[AVGVALUES()]], [[CNTVALUES()]], [[COUNT]], [[MAX()]], [[MAXVALUES()]], [[MIN()]], [[SUM]], [[SUMVALUES()]], [[TOTAL]] |
==Description== | ==Description== | ||
Line 14: | Line 12: | ||
After completion, all record pointers and indexes are returned to their original positions. | After completion, all record pointers and indexes are returned to their original positions. | ||
− | |||
==Example== | ==Example== | ||
Line 27: | Line 24: | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] |
Revision as of 11:38, 10 February 2012
Contents
Purpose
Function to returns the minimum numeric value for a matching series of keys
Syntax
MINVALUES(<expN> [, <for condition> [, <key expr>]])
See Also
ALLVALUES(), AMAX(), AMIN(), AVERAGE, AVGVALUES(), CNTVALUES(), COUNT, MAX(), MAXVALUES(), MIN(), SUM, SUMVALUES(), TOTAL
Description
The MINVALUES() function returns the minimum value of <expN> for a matching series of keys. The required <expN> parameter must be a column name from a table. If none of the optional parameters are specified, then the minimum value of keys matching the current key is returned. An optional <for condition> can be specified to restrict the rows included in the operation. You can also optionally specify a <key expression> to be used instead of the current key.
After completion, all record pointers and indexes are returned to their original positions.
Example
use customer order title // Minimum value of balance column for the number of records matching the current key total_balance = minvalues(balance) // Minimum value of balance column for the number of records matching the key "Mr" m_male = minvalues(balance, .T., "Mr") // Minimum value of balance column for the number of records matching the current key with an expiry date < today m_expired = minvalues(balance, expiry<date())