[Solved] Counting Number in Each Category

Creating tables and queries
Post Reply
peanuttt
Posts: 1
Joined: Thu Nov 22, 2018 5:15 pm

[Solved] Counting Number in Each Category

Post 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!!
Last edited by peanuttt on Fri Nov 23, 2018 5:56 pm, edited 1 time in total.
OpenOffice 3.1 on Windows Vista
UnklDonald418
Volunteer
Posts: 1547
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Counting Number in Each Category

Post 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.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Post Reply