The functions sum a value over past records, which satisfy a specific condition, of the horse, jockey and stable respectively. The results will be broken down by the value of an expression and returned as a character string.
Syntax
HrSumBy('nValueExpr','eBreakdownExpr',nRaces,'fCondition',cDefaultValue,cIncluding)
JrSumBy('nValueExpr','eBreakdownExpr',nRaces,'fCondition',cDefaultValue,cIncluding)
SrSumBy('nValueExpr','eBreakdownExpr',nRaces,'fCondition',cDefaultValue,cIncluding)
Enhanced Syntax
By using the enhanced syntax you may:
1. | carry out multiple statistics in a single pass of past record scanning |
2. | customize the format of return string |
3. | define the order of breakdown groups |
4. | define a summary session in the return string |
The enhanced syntax of these functions is similar to that for HrCountBy( ), JrCountBy( ), SrCountBy( ). Please see its help page for details.
Argument |
Description |
Example |
||||||||
'nValueExpr' |
|
'HrDvdWin( )' |
||||||||
'eBreakdownExpr' |
An expression by which results will be broken down. Omitting this argument tells the function do the statistics over all legitimate records. |
'HrDistance( )' |
||||||||
nRaces |
|
6 |
||||||||
'fCondition' |
|
'For HrFP( )=1 While HrDate( )>Date(1999,9,1)' |
||||||||
cDefaultValue |
Default value returned when no race satisfying the specified condition can be found. The data type of this value must be identical to that of normal return value. |
|||||||||
cIncluding |
When applying the function to past records, by default, races in the underlying meeting are not included. You may use this argument to change the scope. See the following page for details: The cIncluding Argument. |
'R' |
Returns
Character (The length of the returned character string depends on the breakdown expression. It is recommended to set the column data type to Multiline Text, so that the number of characters returned can be of any length.)
Examples
HrSumBy('HrWinTickets( )','HrDistance( )')
The above function sums the win tickets of a horse in all races. The result will then be broken down by distance.
HrSumBy('HrWinTickets( )','HrDistance( )',, 'HrFp( )=1')
The above function sums the win tickets of a horse in all winning races. The result will then be broken down by distance.
See also
HrCountBy( ), JrCountBy( ), SrCountBy( ) | HrAverageBy( ), JrAverageBy( ), SrAverageBy( ) | HrSum( ), JrSum( ), SrSum( )
Page url: http://www.racematenet.com/english/help/index.html?hrsumby.htm