total entries

kitty77

Registered User.
Local time
Today, 08:01
Joined
May 27, 2019
Messages
719
What would be the best way to figure out how many (count) entries are for each entry.
Example, I have a table that has a column that has the color car that they bought. So, I would to know how many records have blue, red, white, etc..
The table has 55K records.

Thanks
 
What you want is called a totals query:


Give that link a read and apply it to your data
 
Not sure which to choose to count my data. When I group by and use count, I get 1 for all?
 
What is your SQL? Sounds like you are including more fields than necessary to get the results you stated
 
you can also try using Crosstab query (say, Query1):

TRANSFORM Count(Table1.ColorColumn) AS CountOfcolor
SELECT "count" AS Expr1
FROM Table1
GROUP BY "count"
PIVOT Table1.ColorColumn;

then, you can use Dlookup to get the count:

Nz(Dlookup("Red", "Query1"), 0)
Nz(Dlookup("Blue", "Query1"), 0)
 

Users who are viewing this thread

Back
Top Bottom