Results 1 to 2 of 2
2006-11-01, 00:04 #1
- Join Date
- Oct 2001
- San Bernardino, California, USA
- Thanked 0 Times in 0 Posts
Simple Query help - grouping & counting (97)
My DB has several fields - one field (TYPE) contains one of two possible values (G & N). another is a date field. I would like a query (or two) that provides:
1) total number of Type G & total number of Type N. Whenever I try to use grouping and count, I always get some mismatch error.
2) Number of G & N by month.
I may be using the term Query wrong - maybe what I need is a report. In any case, I have determined after several hours that I don't know how to do this and my searches though the lounge have not helped.
Thank in advance for any help.
2006-11-01, 01:11 #2
- Join Date
- Jun 2002
- Mt Macedon, Victoria, Australia
- Thanked 45 Times in 44 Posts
Re: Simple Query help - grouping & counting (97)
Have a look at the attached demo.
You do the grouping/counting in queries, but then display the results in a report.
There are three queries.
* One does the overall count
* One does the count by month
* Third is an alternative top the second. Does it as a crosstab.
There is then one report, with three subreports. Each subreport is based on one of the queries.
Making reports from crosstab queries is usually a bit complicated, but in this case the number of columns is fixed so it should work OK.Regards