User total calculating query

J

Jery J.

Hello, i need some help finding out which is the best method of calculating a
users total numbers? I have a data base record displays the case (unique ID),
the user that entered the record and the forms entered by the user and a
number of other things . For this report I just need to generate a report
with the Users and how many Forms 9 and or Form 15 they entered. I created a
query that pulls just the Users and the forms entered, but it counts it as
both 9 and 15 it does not count 9 and or 15. How can i get the query to total
up the amount of 9 and or 15 forms by a user and count either or not only
both.
 
K

karl dewey

Your data should be laid out like this -- User Record_Type then use
this --
SELECT [User], [Record_Type], Count([Record_Type]) AS CountOfForm
FROM YourTable
GROUP BY [User], [Record_Type];

If your data is laid out like this -- User Form_9 Form_15 then use
this --
SELECT [User], Count([Form_9]) AS Form_9s, Count([Form_15]) AS Form_15s
FROM YourTable
GROUP BY [User];
 

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

Top