[Solved] Counting Number in Each Category

Creating tables and queries

[Solved] Counting Number in Each Category

Postby peanuttt » Thu Nov 22, 2018 5:22 pm

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
peanuttt
 
Posts: 1
Joined: Thu Nov 22, 2018 5:15 pm

Re: Counting Number in Each Category

Postby UnklDonald418 » Fri Nov 23, 2018 4:06 am

To do that design a query something like
Code: Select all   Expand viewCollapse view
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.6 & LibreOffice 6.1.5.2 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 1237
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA


Return to Tables & Queries

Who is online

Users browsing this forum: No registered users and 3 guests