User total calculating query

  • Thread starter Thread starter Jery J.
  • Start date Start date
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.
 
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];
 
Back
Top