Microsoft Office Tutorials and References
In Depth Information
Session 3.2
Figure 3-37
Frequently used aggregate functions
Aggregate Function
Determines
Data Types Supported
Avg
Average of the field values
AutoNumber, Currency, Date/Time, Number
for the selected records
Count
Number of records selected
AutoNumber, Currency, Date/Time, Memo,
Number, OLE Object, Text, Yes/No
Max
Highest field value for the
AutoNumber, Currency, Date/Time, Number, Text
selected records
Min
Lowest field value for the
AutoNumber, Currency, Date/Time, Number, Text
selected records
Sum
Total of the field values for
AutoNumber, Currency, Date/TIme, Number
the selected records
To display the minimum, average, and maximum of all the wage amounts in the
Position table, you will use the Min, Avg, and Max aggregate functions for the Wage field.
To calculate the minimum, average, and maximum of all wage amounts:
1. Double-click Create query in Design view , click Position , click the Add button, and then
click the Close button. The Position field list is added to the Query window, and the Show
Table dialog box closes.
To perform the three calculations on the Wage field, you need to add the field to the
design grid three times.
2. Double-click Wage in the Position field list three times to add three copies of the field to
the design grid.
You need to select an aggregate function for each Wage field. When you click the Totals
button on the Query Design toolbar, a row labeled “Total” is added to the design grid. The
Total row provides a list of the aggregate functions that you can select.
3. Click the Totals button on the Query Design toolbar. A new row labeled “Total”
appears between the Table and Sort rows in the design grid. See Figure 3-38.
Figure 3-38
Total row inserted in the design grid
Totals button
Total row
In the Total row, you specify the aggregate function you want to use for a field.
Search JabSto ::

Custom Search