Last post Apr 08, 2011 07:28 AM by PJLaurenson
Apr 08, 2011 06:05 AM|PJLaurenson|LINK
I have a table of records in an access database and need to count and group by separate columns.
The table is called CASES and I need to count records from a certain date range then group them by person from a column called INDIVIDUAL THEN sort within that individual by CASETYPE and display the record cound for each separate individual and case type.
It's for reporting functionality and have no idea where to start with this. Any assistance would be very much appreciated. :-)
Apr 08, 2011 07:08 AM|V.Karthikeyan|LINK
Here is the SQL query you are looking for..
SELECT INDIVIDUAL, CASETYPE,Count(*)
WHERE DateColumn BETWEEN @DateStart AND @DateEnd
GROUP BY INDIVIDUAL, CASETYPE
ORDER BY INDIVIDUAL ASC, CASETYPE ASC
Apr 08, 2011 07:28 AM|PJLaurenson|LINK
Thanks heaps! Worked like a charm! :-)