Help with Count Function

  • Thread starter Thread starter t568aort568b
  • Start date Start date
T

t568aort568b

I have a employee database that I record the date they were
interviewed, what newspaper ad they saw, and if we hired them.
What I would like is a query that would count the number of interviews
per month, count each newspaper ad, and count the nonhires and hires.
The newspaper name is stored in that field and hired, not hired is
stored in the other field.

Sample of what I would like

March Times Sun Reporter Hired Not hired
35 10 10 15 20 15

April Times Sun Reporter Hired Not Hired
10 8 2 0 0 10

I am a new user to access and I am using access 2003. All the queries
I have designed have been in the design view.

Thanks for you help,

Eric
 
Hi,


You did not supply a sample of data from which you start...

Clearly, it sound it would be a job of a GROUP BY query, or TOTAL query
(click on the summation button on the toolbar to get the extra line).
Month(DateTimeField) is likely a candidate for the GROUP, indeed, you can
group on computed expression, like MONTH( ).
You can also SUM over expressions like
iif( test, 1, 0 )

which, basically, counts the number of time the test is true.


And so on.



Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top