queries

  • Thread starter Thread starter 123xxxxx
  • Start date Start date
1

123xxxxx

how do i add the complete total in a query from each individual record i.e.
i record in a field in each record data, numerical, how would i in a
seperate field add all this up to give me a total
 
is this a valid SQL statement

SELECT Sum(field) FROM TableName

or is there something more to be added???
 
is this a valid SQL statement

SELECT Sum(field) FROM TableName

or is there something more to be added???

Well... did you try it?

Yes. This Query will return a single row containing a single field,
the grand total of Field for all records in TableName.

For very flexible grouping, summing, counting and averaging, use a
Totals query. Create a Query based on your table and click the Greek
Sigma icon (looks like a sideways M). By default each field will have
"Group By" on the new Totals row in the query grid; this means that it
will assemble records into groups based on distinct values in these
fields. Change the Group By to Sum (or Count, or Avg, or many other
options) to sum all the values across such a group.
 
yes it did thank you for your help all

John Vinson said:
Well... did you try it?

Yes. This Query will return a single row containing a single field,
the grand total of Field for all records in TableName.

For very flexible grouping, summing, counting and averaging, use a
Totals query. Create a Query based on your table and click the Greek
Sigma icon (looks like a sideways M). By default each field will have
"Group By" on the new Totals row in the query grid; this means that it
will assemble records into groups based on distinct values in these
fields. Change the Group By to Sum (or Count, or Avg, or many other
options) to sum all the values across such a group.
 
Back
Top