Current location - Training Enrollment Network - Mathematics courses - What is the difference between the count and Sum functions of VFP? There should be specific examples, how to use it, when to use count and when to use sum.
What is the difference between the count and Sum functions of VFP? There should be specific examples, how to use it, when to use count and when to use sum.
COUNT calculates the number of specified records in a given range.

SUM calculates and displays the sum of an expression recorded in the database within a certain range.

For example, if you want to count the number of students with a math score of 90 or above in the student report, use the count command.

Use student grades

Math Score > =90 to yx Count

? yx

use

If you want to count the average score of mathematics (assuming there are 60 people), you need to use sum.

Use student grades

Add math scores to zcj

pj=zcj/60

? pj

use