Page 1 of 1

[Solved] Counting Number in Each Category

Posted: Thu Nov 22, 2018 5:22 pm
by peanuttt
Hello! How do i count a certain category in Access 2016?
For example, if i have over 5000 records and my fields include many different animal breeds and i want to count how many animals there are in each breed, how do I do it? Tried finding for it but couldn't :(
Any help will be appreciated thanks!!

Re: Counting Number in Each Category

Posted: Fri Nov 23, 2018 4:06 am
by UnklDonald418
To do that design a query something like

Code: Select all

SELECT "Breed", COUNT( "Breed" ) FROM "TableName" GROUP BY "Breed"
The GROUP BY statement should generate a list where each breed is listed once.
The COUNT function should display a count of how many records are in each group.