The functions return both sum and count of a racing datum in the past records. The 2 figures are returned in a single string separated with a ','. For example, a returned value "1324,11" means that 1324 is got by summing up 11 races.
Using these functions, you can get sum, count, and average (sum/count) by only scanning the database once. It is much faster than applying HrSum( ), HrCount( ), and HrAverage( ) in separate columns.
Use the ListVal( ) function to retrieve a specific item in the list.
Syntax
HrSumCount('nValueExpr',nRaces,'fCondition',cDefaultValue,cIncluding)
Argument |
Description |
Example |
||||||||
'nValueExpr' |
|
'HrDvdWin( )' |
||||||||
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
Examples
HrSumCount('HrWinTicket( )',3)
The above example returns the sum and count of win investment of the last 3 races of the horse.
If the above function is put into a column 'WinTK', the following functions will returns the sum, count, and average from the result respectively:
Sum: ListVal(Column('WinTk'),1)
Count: ListVal(Column('WinTk'),2)
Average: Column('Sum')/Column('Count')
HrSum('HrWinTicket( )',4,'For HrDistance( )=1400')
The above example returns the sum and count of win investment of the last 4 1400m races of the horse.
HrSum('HrWinTicket( )',,'For HrDistance( )=1400 and HrAveRating( )>100',95003)
The above example returns the sum of win investment of all races meeting the following conditions:
1. 1400m race
2. Average rating of the race is greater than 100
If there is no past race satisfying the condition, the default value 95003 will be returned.
Page url: http://www.racematenet.com/english/help/index.html?hrsumcount.htm