Solved

Select Count of distinct items

Posted on 2008-10-29
1
156 Views
Last Modified: 2012-05-05
I need a SQL statement.

I have a MS Access Table with a "Status" field (column).

There could be any number of distinct values in the Status field

Example

Trader
Keeper
Loaner
etc.

How can I get the totals of each of these from the status field of the table?

Example:

Trader 20
Keeper 9
Loaner 31
etc

thanks

0
Comment
Question by:geocoins-software
1 Comment
 
LVL 9

Accepted Solution

by:
jamesgu earned 250 total points
Comment Utility
select status, count(*)
from <table>
group by status
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now